Skip to content

Instantly share code, notes, and snippets.

Avatar

Sadique Ali Koothumadan sdqali

View GitHub Profile
View bug.go
package main
import (
"log"
"net/http"
"github.com/gorilla/mux"
"database/sql"
_ "github.com/mattn/go-sqlite3"
)
View mingle_hmac_client.rb
# testing using ruby 1.9.3
# Example code to access the Mingle API with an HMAC key pair.
# This example uses the api_auth gem (v 1.0.3)
require "uri"
require "net/https"
require "time"
require "rubygems"
require "api_auth"
@sdqali
sdqali / gist:6756799
Last active Dec 24, 2015
Gist Blog - Blogging for Hackers
View gist:6756799
Write your stuff in a Markdown Gist and share it as an easy-to-read blog post.
## Usage
1. [Create a Gist](https://gist.github.com/) and copy the ID. The id will be a number like **6756799** for public gists and a key like **4f0b868e8fd13f77f10e** for private gists.
1. Read the post at *http://gb.sdqali.in#gist-id*
The gist source for this post can be found [here](https://gist.github.com/sdqali/6756799).
### Credits
This is a JavaScript implementation of [Idan Gazit](http://gazit.me/)'s [Gist.io](http://gist.io/).
View gist:3825914
(require 'rcirc-robots)
(add-hook 'rcirc-print-hooks 'rcirc-robots--dispatcher)
View gist:3788028
(require 'url)
(require 'json)
(defun ud-define (wd)
(interactive "M")
(let ((url-request-method "GET"))
(url-retrieve (concat "http://urbanscraper.herokuapp.com/define/" wd ".json")
(lambda (x)
(goto-char (point-min))
(search-forward-regexp "\{.*")
View draw.js
var foo = d3.geo.albers();
d3.json("india.json", function(collection) {
d3.select("svg").selectAll("path")
.data(collection.features)
.enter().append("path")
.attr("d", d3.geo.path().projection(foo));
});
View gist:3226455

I am just trying out gist.io

def foobar(bar):
   print repr(bar)

Let's see how that code looks

View gist:2955562
options = {
'init': init_journal,
'safekeep': safekeep,
'jot': jot
}
options.get(command, wrong_command)()
View gist:2763149
arr.filter(function(a){
return a % 2 == 0;
})
.reduce(function(a, b) {
return a + b;
});