Improved version of nicholascloud/top-level-npm-pkgs.md
function npmls() {
npm ls "$@" | grep "^├─┬" | sed 's/├─┬ //g'
}
Gets you:
function coffee() { | |
hours=${1} | |
time=$(( $hours*3600 )) | |
echo "Will prevent sleeping for $hours hours." | |
$(caffeinate -u -t "$time") | |
} |
function emojify (domElement, ressource, size) { | |
var element = document.getElementById(domElement) | |
var matching = element.innerHTML.match(/:[a-z0-9+_-]+:/g) | |
for (var i = matching.length - 1; i >= 0; i--) { | |
element.innerHTML = element.innerHTML.replace(matching[i], '<span style="display:inline-block;background-image:url('+ressource+matching[i].slice(1, matching[i].length - 1)+'.png);background-size:'+size+'px;height:'+size+'px;width:'+size+'px;vertical-align:-10%;"></span>') | |
} | |
} |
* { | |
-webkit-box-sizing:border-box; | |
-moz-box-sizing:border-box; | |
box-sizing:border-box; | |
} | |
.container { | |
position: relative; | |
width: 590px; | |
margin: 0 auto; |
#!/bin/bash | |
GREEN="\033[1;32m"; | |
RESET="\033[m"; | |
echo "Searching for standalone formulae..."; | |
dependencies=(); | |
for formula in $(brew list); do | |
deps=(`brew uses $formula --installed | tr '\n' ' '`); | |
# Add the formula if it's being used by another, installed one | |
if [ ${#deps[@]} -lt 1 ]; then |
FILES_PATTERN='\.(js|coffee)(\..+)?$' | |
FORBIDDEN='console.log' | |
git diff --cached --name-only | \ | |
grep -E $FILES_PATTERN | \ | |
GREP_COLOR='4;5;37;41' xargs grep --color --with-filename -n $FORBIDDEN && echo "COMMIT REJECTED. Found $FORBIDDEN references. Please remove them before commiting" && exit 1 |
Improved version of nicholascloud/top-level-npm-pkgs.md
function npmls() {
npm ls "$@" | grep "^├─┬" | sed 's/├─┬ //g'
}
Gets you:
$ brew install irssi
I hereby claim:
To claim this, I am signing this object:
# Add this to your .profile | |
# $ fortunecow | |
function fortunecow() { | |
files=`cowsay -l | cut -d \: -f 2 | xargs echo` | |
arr=("${(s/ /)files}") | |
file=$arr[$RANDOM%$#arr+1] | |
fortune | cowsay -f $file | |
} |
Sean Conner | |
http://lua-users.org/lists/lua-l/2015-04/msg00033.html | |
5.1 5.2 5.3 function | |
__add * * * a + b | |
__sub * * * a - b | |
__mul * * * a * b | |
__div * * * a / b | |
__mod * * * a % b | |
__pow * * * a ^ b |