Skip to content

Instantly share code, notes, and snippets.

View looselytyped's full-sized avatar

Raju Gandhi looselytyped

View GitHub Profile
{
"cmd": ["node", "$file"],
"selector": "source.js"
}
#!/bin/bash
projectFile=$(find $1 -name "*.sublime-project" -maxdepth 1)
echo $projectFile
if [ $projectFile ]
then
subl $projectFile
else
subl $1
fi
#!/bin/bash
wget https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/jsshell-mac.zip;
rm js libmozglue.dylib libnss3.dylib;
tar -xvf jsshell-mac.zip;
rm jsshell-mac.zip;
{
"auto_complete": true,
"auto_indent": true,
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
"*.ico",
"*.jar",
@looselytyped
looselytyped / gist:f8bc9de6cf7901ac16ea
Created March 8, 2015 15:55
Learn To Learn Book List
Talent Is Overrated
The little book of Talent
Mindset by Carol Dweck
Refactor your Wetware
The inner game of tennis
How to Read a Book
The Mind Map Book
Spark by John Ratey
Driven To Distraction by John Ratey
The Art of Learning: A Journey in the Pursuit of Excellence
apply plugin: "base"
tasks.all { task ->
task.ext.transitiveClean = {
tasks."clean${task.name.capitalize()}".dependsOn {
depsOf(task).flatten().collect { "clean${it.name.capitalize()}" }
}
}
}

Destructuring Composite Data

Problem

You want to destructure a sequential (e.g. list, vector) or an associate (map) collection.

@looselytyped
looselytyped / Prototypal Inheritance in JavaScript
Created November 3, 2012 21:27
A set of JavaScript examples to explore prototypal inheritance. Use the Chrome/Safari Developer Tools console to run
clear();
var assert = function(bool, msg) {
if(!bool) {
console.error("INVALID: " + (msg ? msg : ''));
}
}
////////////////////////////////////////////////////////
clear();
@looselytyped
looselytyped / pictures.markdown
Created August 30, 2012 14:30 — forked from sent-hil/pictures.markdown
River (getriver.com): Keep a programming journal.

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
(defsnippet link (java.io.StringReader. "<a href=\"\"></a>")
[:a] [l t] (comp
(fn [node] (assoc node :content (list t)))
(fn [node] (update-in node [:attrs :href] #(str l %)))))