Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am thurston on github.
  • I am thurston (https://keybase.io/thurston) on keybase.
  • I have a public key ASBY9vKgn3c1wNYy5LjkA0wj_kJDex2b3UCL_-b8vunyDgo

To claim this, I am signing this object:

@THuRStoN
THuRStoN / Ember Debug
Last active August 29, 2015 13:59
Inspecting in Ember Applications
// https://github.com/aexmachina/ember-debug
Em.inspect && Em.keys
App.__container__.lookup
Em.View.views[ 'ember605' ]
Em.keys(Em.TEMPLATES).forEach(function(t){console.log(t)})
App.debug.controller( 'albums' );
App.__container__.lookup( 'controller:albums' );
@THuRStoN
THuRStoN / random DNI generator
Created March 10, 2014 16:23
A random DNI generator for testing purposes in JavaScript
function formatNumberLength(num, length) {
var r = "" + num;
while ( r.length < length ) {
r = "0" + r;
}
return r;
}
function charDNI(dni) {
var chain = "TRWAGMYFPDXBNJZSQVHLCKET";
@THuRStoN
THuRStoN / debug.css
Last active August 29, 2015 13:56
CSS — Debug Elements
* *:hover { border:2px solid #89A81E } /* Solid Green */
* * *:hover { border:2px solid #F34607 } /* Solid Orange */
* * * *:hover { border:2px solid #5984C3 } /* Solid Blue */
* * * * *:hover { border:2px solid #CD1821 } /* Solid Red */
* * * * * *:hover { border:2px dotted #89A81E } /* Dotted Green */
* * * * * * *:hover { border:2px dotted #F34607 } /* Dotted Orange */
* * * * * * * *:hover { border:2px dotted #5984C3 } /* Dotted Blue */
* * * * * * * * *:hover { border:2px dotted #CD1821 } /* Dotted Red */
@THuRStoN
THuRStoN / .bash_profile
Created August 31, 2011 18:18
Bash w/ Git integration
# Set prompt to abbr. of current directory & (git branch).
#PROMPT_COMMAND='CurDir=`pwd|sed -e "s!$HOME!~!"|sed -E "s!([^/])[^/]+/!\1/!g"`'
#1st PS1='\e[1;34m\u\e[1;35m@\e[0;39m\h\e[0;39m $CurDir$(__git_ps1) \e[1;35m>\e[0;39m '
#2nd export PS1='\e[1;34m\u\e[1;35m@\e[0;39m\h\e[0;39m \[\033[1;33m\]\w\[\033[0m\]$(__git_ps1) \e[1;35m>\e[0;39m '
function parse_git_dirty {