Notes from Persepolis
GoodReads: “The Complete Persepolis” People, books and other things Sachertorte - delicious chocolate cake in Vienna Found references to Jacques Lacan & psychoanalysis. New words Perspicacity Blase Intransigence Obscurantism
GoodReads: “The Complete Persepolis” People, books and other things Sachertorte - delicious chocolate cake in Vienna Found references to Jacques Lacan & psychoanalysis. New words Perspicacity Blase Intransigence Obscurantism
Install Look up and install Requester package from the sublime-text Package Control repos. Configure Create a directory to install Python packages for general use. I’ll assume you have exported it to $MY_FAV_PY_DIR Install pipenv cd $MY_FAV_PY_DIR pipenv shell Install supporting packages pipenv install requests-oauthlib pipenv install requests-toolbelt pipenv install graphql-py That should drop…
If you haven’t read about my GTD setup - checkout part-1 here . Tools Remember The Milk Pro Cross-platform with LOTs of options Open API and a web-interface are important to me Google Calendar Use this to visualize performance IFTTT To hook apps together over the internet For this applet Create a routine I created a bunch of recurring daily tasks in a list called Routines . Routines denote alloted…
The following is my GTD setup. I use Remember The Milk Pro to manage my todos. Basic setup Create 4 smart-lists with specific tags as search criteria. Depending on your todolist software, you could just use tags and be done with it. gtd:next 🤜 for tasks to do with the tag gtdnext gtd:waiting ⏰ for tasks to do with the tag gtdwaiting gtd:someday 🏃 for tasks to be done someday tagged with…
Job hunts can be painfully repetitive, with long wait times. Most Applicant Tracking Systems (ATS) are terrible. Candidates are forced to fill in dozens of fields that are already on the resume. After all this, they still run the risk of the resume getting sucked into a blackhole inbox/app that no one reads. In fact, a contact in one popular hosting company I applied to, admitted that no one in…
Made my first voxel art today with MagicaVoxel . Took around 5hrs. The time includes learning the tool itself and a few tricks.
One of these days I find the need to create a VPC on AWS. “CIDR” , says an input box. Somewhere on the page is this: 10.0.0.0/16 An internet search and 10 minutes later, it all feels like bread-butter-jam. So what does “CIDR” mean? IPv4 is a 32 bit addressing system. 32 not because of any scientific reason. Just that a bunch of people thought that would be sufficient to assign unique IP addresses…
Recently had to explain the difference between GenServer message types to handle TCP protocols. Here’s a simple HelloServer handling call , cast and info messages. defmodule HelloServer do use GenServer def handle_call(msg, _from, state) do {:reply, "Received in call: #{msg}", state} end def handle_cast(msg, state) do :timer.sleep 2000 IO.puts "Received in cast: #{msg}" {:noreply, state} end def…
There’s a lot Emacs literature and config files floating on the internet. I’ll most likely have my own requirement/taste. I’ll focus on the tiny details that work for me. I’ll improve over my own copied-edited-hacked-together workflow. emacsclient Emacs startup can take a few seconds. If that’s unbearable for quick editing, then have an emacs server running. $ emacs --daemon Whenever required, use…
The following will first show off using Phoenix with exrm and then try some ideas to improve usage. Assumes a freshly generated Phoenix app called hello_phoenix & the current working dir is the project’s root dir. The setup Add exrm as dependency in mix.exs Fetch & compile deps $ mix deps.get $ mix deps.compile Generating & running apps via releases As soon as you generate a Phoenix or any mix…
Phoenix framework is a nice Elixir web-framework with very useful features. Hound is a library to write browser-based integration tests in Elixir (and also automate browsers if you like). A few people have had difficulties setting up Hound with Phoenix. So I dug into it and wrote down notes for anyone who’s trying it out. 1.) Generate a new Phoenix project. We’ll call the project “hello_phoenix”.…
TL;DR: Brunch skeleton with Bower & Babel is available here If you are setting up tools for frontends after a few months or a year, you’ll feel pretty outdated. Finding tools that complement or compete with each other is where the confusion starts. This is my attempt at brushing my frontend skills with newer tools. The tools Brunch Tool to concatenate & minify javascript and CSS Copies that along…
If you are a slow internet connection, Riak build would fail to download Solr from Amazon S3. As of Riak 2.0 rc1, the Solr download URL is http://s3.amazonaws.com/files.basho.com/solr/solr-4.7.0-yz-1.tgz . Looking through the download script , it checks for a local cached copy in $TMP_DIR and also checks the env var $SOLR_PKG_DIR for the dir path in which Solr pkg can be found. For a slow internet…
Hound is a library for browser automation and to write integration tests in Elixir. I’ve been working on it during the last few weeks of 2013. TL;DR: Source code , API docs Thanks to Jose Valim for feedback on refactoring the internals of Hound. And to everyone on the Elixir IRC for helping out during the countless times I’ve come with an odd query. Hound provides a lot of simple helpers For…
While working on an application with Riak, I was in a bit of discomfort that I had to resort to hacky ways to store data in order to suit the querying methods available in Riak v1.4. I found out some really cool features are coming to Riak 2.0. Including bundled Solr. This layer it seems was a ground-up write codenamed Yokozuna , set to replace the search that came with Riak v1.4. Basho has a…
Why is a pool manager required? When building an application, you might have processes that perform time consuming tasks. Process pools can be used in these cases. With process pools, you can have a pool of processes started up and ready to serve. You can then send messages to them whenever you want them to do something. With a pool manager you can make sure that, no more than a set limit of…
Riak is an opensource distributed non-relational database. In Riak, you do not have tables with fixed schema (‘columns’) to store data. Instead you have buckets. And buckets hold keys and their values. The values may be of different types. If you are on a Mac with Homebrew, then installing Riak is one command away: brew install riak For everything else, checkout the Riak documentation Start Riak…
On a discussion at HackerStreet about the quality of new talent cropping up, I found @nutanc ’s comment . …I have been dealing with students for almost the past 10 years. Teaching them. Every year, year after year, the normal distribution holds. You will find a small set of students who do not want to be/cannot be in engineering. The vast majority of them are average joes, who with the right kind…
A lot of people I know are working on startups (especially remote workers), side-projects or freelancing. What most people will tell you is that it reduces your social life to nothing. That only happens when you shut yourself up in the house, to work on something for a stretch of time - and not talk much to people. If you need an incentive not to do that, then here’s a fact - your side project…
A few days ago, I launched CreateMyInvoice.com . Hacker News effect The post on Hacker News looked pretty dull for the first few minutes. And then all of a sudden, the unexpected happened - it shot up to the front page in about 30min. Remained there on top of HN for about 7hrs, before gradually dieing off. The following are the stats for the 24hrs after launch: 5335 visits 5158 unique visitors…
I’ve been working on a small game these days. I found myself in a situation where I had to scale up a tilemap I had made. So that the brick walls could be more. A tilemap can be represented as a two-dimensional array. What I had to do here, is take a matrix of the following kind: 1 2 3 4 5 6 7 8 9 and turn it into 1 1 2 2 3 3 1 1 2 2 3 3 4 4 5 5 6 6 4 4 5 5 6 6 7 7 8 8 9 9 7 7 8 8 9 9 Notice the…
Codelearn.org built by Ashish Sharma and Hemanth teaches you how to build web applications with Ruby On Rails . What differentiates this from other tutorial sites is that, it also lets you follow whatever’s being taught on an online code playground. The tutorials focus on building a todo list app, which is a standard helloworld for those new to building web applications. If you follow through the…
I’m from India and I recently bought a new iPad. However having a device that I cannot program on sounded really bad to me. So I applied for the iOS developer program. It took me about 4 days - applied on Monday and I was in on Thursday. I used my mother’s credit card since I don’t have one and getting a credit card in India requires a deposit in most banks here. I contacted Apple Developer…
This post shows you how to make an app that has the following flow: Enter text your name in an input field. Click a button and an alert box opens up to greet you. Here’s a video of it - Stuff you need to know I’m assuming that you are comfortable with Ruby. RubyMotion doesn’t support require autoload define_method and a few more. So most of your rubygems turnout to be useless, unless you hack them…
I was tinkering with Rails4 from source and noticed something interesting in the Gemfile of an app that Rails generated. gem 'rails', github: 'rails/rails' The :github option? Looks like this was added recently . From the Gemfile manual : If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify just the github username and repository…
I’m sure you’ve noticed the magical Rails.env Rails.env # => "development" # This also works... Rails.env.development? # => true If you need your strings to work the same way, use the super-charged, ActiveSupport::StringInquirer which inherits from the String class. movie = ActiveSupport::StringInquirer.new "godfather" movie == "godfather" # => true movie.godfather? # => true movie.dirty_harry? #…
ActiveSupport::Configurable , which is part of ActiveSupport in Rails, gives objects the ability to store configuration options. Here’s how you can use it to augment an object with configuration options. class Employee include ActiveSupport::Configurable end employee = Employee.new employee.config.research_lab_entry = :not_allowed employee.config.paid_leave = 5 When a config option that has not…
I just found out how to indent multiple lines in Vim. Use = at the line where you want to start the auto-indentation. Then move to the line where you want to auto-indent until. Example: if you are in normal mode, and want to indent the current line and the next 2 lines, you would do = , then 2j . To auto-indent the full file, and you were at the top of the file, you could do =G . You can also…
I’ve been using pry for a while and I’ve always been curious about it. So to see how debuggers work, I tried writing the simplest debugger in Ruby. Thanks to the vast number of rubygems out there, it sums upto just 6 lines. require 'ripl' class Binding def take_a_look Ripl.start :binding => self end end Now if you want to debug some program, just drop the following line and it’ll fire up a REPL…
This blog is now powered by Jekyll and Github pages. I’ve ported some posts from my previous blog . After a dozen free services I’ve adored shutdown, I’ve got no hope for any service out there that isn’t charging me for using the service. “I can haz my own theme. I can haz my own posts. I can haz my blog”
There are a lot of services that come as go these days. Putting it in Robert Frost’s style, "Services may come and services may go, But users may go on forever" Some services get bought when larger companies go shopping and may become many things, sometimes even dead. Some others just shut shop when their time is up. I have very high respect for people running services (useful or fun) that put a…
When people find themselves in situations when nothing seems to make it possible to get the expected result. Some quit and some others force themselves to find a solution. It may be due to deadlines. And it may also be what happens, when something is turned into a Fashion contest. I feel it’s very wrong to be imposing deadlines for such tasks. These tasks are mostly of creative type. It’s very…
If you take a look around, you’ll notice that there are so many awesome things you can work on. So many problem lie unsolved or can be solved better. And then you want to work on everyone of those. It’s good to get a lot of ideas. Some of those may have great potential to help people and change the way they do things. I’m tempted to start working on those immediately. When I find ideas, I find it…
I’m a fan of science fiction, especially fiction that has the possibility of being real tomorrow. One of those topics is time travel. Everybody at some point in their life has wished to go back or forward in life for some purpose, however silly it might have been. I watched the movie The Time Machine (2002) today and it is based on the book by H.G.Wells and had an interesting thought, that time…
Today I had a horrid 15min trying to figure out why git isn’t ignoring my database config file inspite of adding that to the repo’s .gitignore . I dug through the .gitignore files of all my other repos and it seemed like I had done everything right but still the file I asked git to ignore wasn’t being ignored. Finally, found out what caused the issue. Me. I had already added the database config…
BillMeBob.com Create invoice Get short-url Share it A sarcastic line, that I didn’t want to signup for some other service to generate just one invoice turned into a quick one-week app - BillMeBob.com . I took off a week from my other always-thinking-of-it idea to create BillMeBob and get used to Rails3. P.S: I turned 20 last week