Usage:
cp-permissions <from> <to>...
/** | |
* waitFor.js | |
* | |
* Silly lib that executes a given callback when a variable is defined on window. | |
* | |
* Matías Lescano | @mjlescano | |
* Licensed under the MIT license | |
*/ | |
;if( !window.waitFor ) (function(w){ |
#!/bin/bash | |
# Usage: | |
# retry <commands...> | |
# retry <retry times> <commands...> | |
# retry <retry times> <retry wait> <commands...> | |
if [[ $2 =~ ^-?[0-9]+$ ]]; then | |
cmd="${@:3}" | |
retry_times=$1 |
#!/bin/bash | |
if [[ -d "$*" ]]; then | |
find "${*%/}" -iname '*.mp3' -print0 -exec $0 {} + | |
else | |
mpg123 -C "$@" | |
fi |
Usage:
cp-permissions <from> <to>...
log() { | |
echo "$(tput setaf 6) · $@$(tput sgr0)" | |
} | |
read -e -p 'Heroku App Name? (e.g. `legoland-democracyos`) ' APP_NAME | |
read -e -p 'Mongo Host:port/db? (e.g. `ds043991.mongolab.com:43991/heroku_app34008377`) ' MONGO_HOST | |
read -e -p 'Mongo User? ' MONGO_USER | |
read -e -p 'Mongo Pass? ' MONGO_PASS | |
log "Setting maintenance:on" |
/** | |
* onResize.js | |
* | |
* `window.onresize` handler with a debounced calling to avoid unnecessary re-paints. | |
* | |
* e.g.: | |
* onResize.add(function(){ | |
* console.log('Executed on window resize! But debounced.') | |
* }) | |
* |
git config --global alias.cf '!sh -c "git diff --name-only | uniq | xargs subl"' |
#! /bin/bash | |
info () { | |
echo "$(tput setaf 6) · $@$(tput sgr0)" | |
} | |
warn () { | |
echo "$(tput setaf 3) · $@$(tput sgr0)" | |
} |
var OWNER_EMAIL = process.env.OWNER_EMAIL || '[email protected]' | |
//-------------------------- | |
require('lib/models')() | |
var config = require('lib/config') | |
var models = require('lib/models') | |
var User = models.User |
var fs = require('fs') | |
var json2csv = require('json2csv') | |
var models = require('lib/models') | |
models() | |
var Topic = models.Topic | |
Topic | |
.find({deletedAt: null}) |