Start Terminal.app and type:
sudo nvram boot-args="kext-dev-mode=1"
Verify that command works by typing:
sudo nvram -p | grep -i boot-args
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
[*.{js,less}] | |
indent_style = space | |
indent_size = 2 | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
var getStorageSize = function() { | |
return Object.keys(window.localStorage).map(function(key) { | |
return window.localStorage.getItem(key).length; | |
}).reduce(function(prev, curr) { | |
return prev + curr; | |
}); | |
}; |
/* Courtesy of MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors */ | |
div[attr] { /* "has attr" - element contains 'attr' attribute, value does not matter. */ } | |
div[attr=value] { /* "exactly" - attr is exactly value. */ } | |
div[attr~=value] { /* "contains" - attr is a whitespace-separated list of words, one of which is "value". */ } | |
div[attr|=value] { /* "exactly or begins with `value-` - attr can be exactly "value", or it can _begin_ with "value" immediately followed by “-” (U+002D). */ } | |
div[attr^=value] { /* "starts with" - attr's _first_ value is prefixed by "value". */ } | |
div[attr$=value] { /* "ends with" - attr's _last_ value is suffixed by "value". */ } | |
div[attr*=value] { /* "contains" - attr contains at least one occurrence of "value" as a substring. */ } | |
div[attr(~|^$*)=value i] { /* "case-insensitive <query>" - applies a case-insensitive search on the query (any of the above examples will work, just end the selector with 'i' */ } |
alias docker_rm_containers='docker rm $(docker ps -a -q)' | |
alias docker_rm_dangling='docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null' | |
alias docker_kill_all='docker kill $(docker ps -a -q)' | |
alias docker_rm_images='docker rmi $(docker images -a -q)' | |
alias docker_danger_rm_all='docker rmi $(sudo docker images -aq) --force' |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// https://xstate.js.org/viz/?gist=0f8b8f754118cad1507fd3b77fb5ad72 | |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |