Skip to content

Instantly share code, notes, and snippets.

Arnab Deka arnab

  • AWS
  • Seattle, USA
Block or report user

Report or block arnab

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hallettj / global-variables-are-bad.js
Created Feb 14, 2009
How and why to avoid global variables in JavaScript
View global-variables-are-bad.js
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
// Because if you don't, the become global variables.
(function() {
matthewmueller /
Last active Feb 8, 2020
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
scottsb /
Last active Jan 31, 2020 — forked from Hais/
Create and manage a case-sensitive disk-image on macOS (OS X).
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
berezovskyi / gist:2c4d2a07fa2f35e5e04c
Created Sep 4, 2014
convert a uuid to biginteger
View gist:2c4d2a07fa2f35e5e04c
private BigInteger getBigIntegerFromUuid(UUID randomUUID) {
ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
return new BigInteger(bb.array());
bixuanzju / sml.el
Last active Dec 25, 2015
For Coursera
View sml.el
(defun isml ()
"If sml repl exists, then restart it else create a new repl."
(when (get-buffer "*sml*")
(with-current-buffer "*sml*"
(when (process-live-p "sml")
(sleep-for 0.2))
(sml-run "sml" ""))
arnab / import_geonames_to_pg.sql
Created Jun 19, 2013
Import geonames data from into postgres.
View import_geonames_to_pg.sql
-- Data from
-- More details at
-- Steps at
CREATE TABLE geoname (
geonameid INT,
name VARCHAR(200),
asciiname VARCHAR(200),
bayan / gist:3331552
Created Aug 12, 2012
Ruby's array of words and symbols shortcuts in Clojure - an example of how macros can be used to implement language level features that are present in other languages
View gist:3331552
;; Ruby has a short cut to specify an array of words: %w(apple bee carrot) → ["apple", "bee", "carrot"]
;; This can't be implemented in Ruby itself, and requires the language designers to implement this (in C).
;; Clojure, being a Lisp, allows anyone to add such a feature directly using a macro:
(defmacro %w [& args] `(map str '~args))
(%w apple bee carrot)
;; → ("apple" "bee" "carrot")
You can’t perform that action at this time.