Skip to content

Instantly share code, notes, and snippets.

View ideamonk's full-sized avatar
🍹
wfh

Ideamonk ideamonk

🍹
wfh
View GitHub Profile
@ideamonk
ideamonk / spring.md
Created December 11, 2012 03:02
voices to voices, lip to lip

While you and i have lips and voices

which are for kissing and to sing with,

who cares if some one-eyed son for a bitch

invents an instrument to measure Spring with?

-- e.e. cummings [ http://goo.gl/sqoME ]

@ideamonk
ideamonk / User preferences
Created November 16, 2012 07:20
Disabling arrow keys in Sublime Text 2
[
{ "keys": ["right"], "command": "null"},
{ "keys": ["left"], "command": "null"},
{ "keys": ["up"], "command": "null"},
{ "keys": ["down"], "command": "null"}
]
@ideamonk
ideamonk / english-values.clj
Created September 6, 2012 22:50
Parsing English
;;; Author: Abhishek Mishra <ideamonk@gmail.com>
; ; http://www.reddit.com/r/dailyprogrammer/comments/zfeb2/9062012_challenge_96_intermediate_parsing_english/
; ; seven hundred and fourty-four million
; (-> 7 (* 100) (+ 40 4) (* 1000000) )
; ; ten-million and ninety-four
; (-> 10 (* 1000000) (+ 90 4) )
@ideamonk
ideamonk / dahi_chicken.md
Created September 6, 2012 11:20
Mom's awesome dahi chicken recipe
  1. Wash chicken with 1 tsp salt & water
  2. Remove water and Put in fridge - 1 hr
  3. If 800gm chicken, put 500gm curd
  4. Marinate 5 minutes (it should not leave out water)
  5. In Kadahi -
    1. 2-3 spoon mustard oil
    2. tsp Methi dana or Panchphoran
    3. 1-2 Tej pattas
    4. 3-4 whole green chillie with cuttings length wise
  6. 5-6 Kalis of Lahsoon (cut into tiny bits)
@ideamonk
ideamonk / application.rb
Created August 29, 2012 22:36
Adding fonts to rails asset paths, E.g. font-awesome :)
# Add the fonts path
config.assets.paths << "#{Rails.root}/app/assets/fonts"
# Precompile additional assets
config.assets.precompile += %w( .svg .eot .woff .ttf )
@ideamonk
ideamonk / bfpp.clj
Created August 21, 2012 15:55
Brainfuck Printer Printer / can be still optimised for shorter output
; http://www.reddit.com/r/dailyprogrammer/comments/yj32c/8202012_challenge_89_intermediate_printing/
; put http://pastebin.com/raw.php?i=v8AbQRFv in data/the-raven
;
; brainfuck printer printer
; -------------------------
; lame version - spits 206325 bytes
; (defn change-set
; [op n]
@ideamonk
ideamonk / one.clj
Created August 20, 2012 14:26
Clojure/enlive/fun
; http://www.reddit.com/r/dailyprogrammer/comments/y5sox/8132012_challenge_88_easy_vigenère_cipher/
; this solution reads the problem & wikipedia in order to find the answer :)
(ns one.core
(:require [net.cgrand.enlive-html :as html])
(:use [clojure.string :as str :only [split]] :reload))
;
; part one - encrypt & decrypt
;
@ideamonk
ideamonk / spec_helper.rb
Created July 11, 2012 11:42
Make RSpec aware of named routes
RSpec.configure do |config|
#
# ...
#
config.include Rails.application.routes.url_helpers
end
@ideamonk
ideamonk / headers_fix.sh
Created July 9, 2012 08:08
Fix for missing headers while building native extensions
# E.g. rb-fsevent gem fails with
# fsevent/fsevent_watch.c:1:10: fatal error: 'stdio.h' file not found
#
# XCode 4.3.3 , OSX Lion 10.7.3
#
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
@ideamonk
ideamonk / database.yml
Created July 9, 2012 07:29
DRY-ish db config
# A DRY-ish config
common: &common
adapter: postgresql
encoding: unicode
template: template0
pool: 5
username: amal
password: