Skip to content

Instantly share code, notes, and snippets.

@dhaneshkk
dhaneshkk / upgradeNode.sh
Created December 9, 2015 05:05
upgrading node js latest on mac
brew update
brew upgrade node
npm update -g npm
@dhaneshkk
dhaneshkk / ramda
Created December 7, 2015 17:09 — forked from raine/ramda
Browse Ramda documentation in Terminal
#!/usr/bin/env bash
# Browse Ramda documentation in Terminal
# Requires jq and a tool such as fzf or peco for interactive filtering
LATEST="http://raine.github.io/ramda-json-docs/latest.json"
DOCS_URL="http://ramdajs.com/docs/"
json=$(curl -s $LATEST)
functions=$(echo "$json" | jq -r '.[] | if .sig and (.sig | length > 0) then .name + " :: " + .sig else .name end')
@dhaneshkk
dhaneshkk / elmGame.elm
Last active November 23, 2015 19:01
http://sridattalabs.com/2013/12/25/elm/ updated his code for latest elm version
import Keyboard exposing (..)
import Window exposing (..)
import Graphics.Element exposing (..)
{-
Our game will need a state object to store player stats, inventory and such.
For now, we only keep track of whether the game has ended yet.
-}
type alias GameState = {finished : Bool}
defaultGame: GameState
@dhaneshkk
dhaneshkk / stylus-mixins-mdn.styl
Created November 14, 2015 17:25 — forked from joaocunha/stylus-mixins-mdn.styl
Stylus Mixins used on the MDN Kuma project
@require 'vars';
@require 'prefixes';
/*
Provides man mixins for use within the MDN theme.
*/
/* searches expression for the provided string and replaces with provided value */
replace($expr, $str, $val) {
$expr = clone($expr);
install JDK
export JAVA_HOME="$(/usr/libexec/java_home)"
brew update
brew install scala
brew install sbt
@dhaneshkk
dhaneshkk / CompendiumNG installation steps
Last active December 9, 2015 05:23
compendiumNG installation
java -jar CompendiumNG-installer-2.1.4.jar
--After installation goto
cd /Application/CompendiumNG
zsh CompendiumNG.sh (I am using zsh shell)
@dhaneshkk
dhaneshkk / gist:f4d192d9778ad8d77fb4
Last active November 2, 2015 05:07
java in Mac
If you only want to install the latest official JRE from Oracle, you can get it there, install it, and export the new JAVA_HOME in the terminal.
Open your Terminal
java -version gives you an error and a popup
Get the JRE dmg on http://www.oracle.com/technetwork/java/javase/downloads/index.html
Install it
In your terminal, type: export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
@dhaneshkk
dhaneshkk / using_mailboxes_in_elm.md
Created October 30, 2015 07:58 — forked from mgold/using_mailboxes_in_elm.md
Using Mailboxes in Elm: a tutorial blog post

Using Mailboxes in Elm

Max Goldstein | July 30, 2015 | Elm 0.15.1

In Elm, signals always have a data source associated with them. Window.dimensions is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map, filter, and merge, but the timing of events is beyond your control.

This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?

The Bad Old Days

@dhaneshkk
dhaneshkk / tutorial.mkdn
Last active October 28, 2015 06:09 — forked from liuwen-lvtu/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@dhaneshkk
dhaneshkk / Resume Template.markdown
Created September 18, 2015 16:54
Resume Template