Skip to content

Instantly share code, notes, and snippets.

View jkakar's full-sized avatar

Jamu Kakar jkakar

View GitHub Profile
$ rebar3 pkgs
zipper_tree:
Versions: 0.1.1, 0.1.0
zencoder:
Versions: 0.1.2, 0.1.3, 0.1.1
yyid:
Versions: 0.1.1, 0.1.0, 0.1.2
@jkakar
jkakar / barcelona.md
Created September 4, 2014 08:42
Things to do in Barcelona
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
require 'excon'
require 'json'
account, repo = `git config --get remote.origin.url`.strip.split(':').last.split('/')
repo = repo.split('.').first
branch = `git symbolic-ref HEAD`.strip.split('/').last

Keybase proof

I hereby claim:

  • I am jkakar on github.
  • I am jkakar (https://keybase.io/jkakar) on keybase.
  • I have a public key whose fingerprint is 6364 DEA2 EDCB 4658 AE90 7680 E20D 99DE EAD1 654E

To claim this, I am signing this object:

@jkakar
jkakar / .gitconfig
Last active December 25, 2015 20:39
[alias]
cleanbranches = !/Users/jkakar/bin/gitcleanbranches.sh
@jkakar
jkakar / gitcleanbranches.sh
Created July 18, 2012 23:45
Deleting merged branches with Git
#!/bin/bash
set -x
# Update the master branch.
git checkout master
git pull upstream master
# Synchronize the remote repository.
git push origin master
.emacs:
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "/home/jkakar/.emacs.d/plugins/epylint.py" (list local-file))))
// URI encode some text.
Handlebars.registerHelper('encode', function(property) {
var text = Ember.getPath(this, property);
return encodeURIComponent(text);
});
class Thingy(Storm):
id = Int(...)
_cache = {}
def getValue(self):
if 'value' in self._cache:
return self._cache['value']
else:
# Load value from the database and cache it.
@jkakar
jkakar / gist:2008836
Created March 9, 2012 21:38
GET /values response with new 'updated-at' data
HTTP/1.1 200 OK
Content-Length: 817
Date: Mon, 02 Aug 2010 13:14:32 GMT
Content-Type: application/json
{
"results" : {
"id" : {
"05eee31e-fbd1-43cc-9500-0469707a9bc3" : {
"fluiddb/about" : {