This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ ~/ rex-app | |
/usr/local/lib/node_modules/rex-git/lib/rex-git.js:47 | |
, git_commands = _.rex_commands().git | |
^ | |
TypeError: Object function (obj) { | |
if (obj instanceof _) return obj; | |
if (!(this instanceof _)) return new _(obj); | |
this._wrapped = obj; | |
} has no method 'rex_commands' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* These methods are written for and intended to be used within a Node.js environment. | |
* The only implied dependencies are the built-in Node.js API | |
* | |
* @author Pierce Moore <[email protected]> | |
*/ | |
/** | |
* In Node.js, this function expands the ~ character in a path that designates a user's home directory | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app" : { | |
"name" : "Rex-App Test", | |
"version" : "0.1.0", | |
"root" : "~/Toolbox/" | |
}, | |
"git" : { | |
"mongo" : "https://github.com/rex/rex-mongo.git", | |
"redis" : "https://github.com/rex/rex-redis.git", | |
"app" : "https://github.com/rex/rex-app.git", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In Router.js, whatever route needs validation | |
View({ | |
events : { | |
'click #submit' : 'someFunction', | |
'click #another' : 'anotherFunction' | |
}, | |
//Blahblahblah | |
validate : function(success, error, context) { | |
_.validate( this.validatorConfig, this.model.toJSON(), success, error, context ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* handlebars dashboard.hb -f output.js -a | |
*/ | |
define(['handlebars'], function(Handlebars) { | |
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; | |
return templates['dashboard.hb'] = template(function (Handlebars,depth0,helpers,partials,data) { | |
this.compilerInfo = [4,'>= 1.0.0']; | |
helpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {}; | |
var buffer = "", stack1, self=this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gll='git stash save --include-untracked && git pull --rebase origin $(current_branch) && git stash pop' | |
alias gs="git status -sb" | |
alias peek='git fetch origin $(current_branch) && git lg origin/$(current_branch)' | |
alias gaa='git add -u .' | |
alias gpp='echo "Starting push" && git push --all origin $(current_branch) && echo "Pushing Tags" && git push --tags origin $(current_branch) && echo "Push complete"' | |
alias gr='git reset' | |
alias grh='git reset --hard' | |
alias commit='echo "----------- COMMITTING TO BRANCH: $(current_branch) ----------" && gll && gaa && git commit' | |
alias sync='echo "----------- SYNCING BRANCH: $(current_branch) ------------" && git stash save --include-untracked && git pull --rebase origin $(current_branch) && git push origin $(current_branch) && git stash pop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'randexp' | |
# | |
# String of comma-separated values | |
# | |
/(\w{4,10}, ){2,6}\w{4,10}/.gen | |
# => "colport, antidrag, bahur, fatly" | |
# => "peak, prudential, pyke, Squaxon, oleous" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
artistId | name | popularity | tags | image | url | |
---|---|---|---|---|---|---|
4 | Amy Winehouse | 0.68 | pop,randb-soul,singer-songwriter,2000s | http://cdn.7static.com/static/img/artistimages/00/000/000/0000000004_<$size$>.jpg | http://www.7digital.com/artist/amy-winehouse/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all Homebrew LaunchAgents (*.plist) files | |
grep -irl --include homebrew\*.plist "" /usr/local/opt | |
# Count all Homebrew LaunchAgents (*.plist) files | |
grep -irl --include homebrew\*.plist "" /usr/local/opt | wc -l | |
# List all registered Vagrant machines | |
vagrant global-status | ruby -lne 'STDIN.readlines.each {|line| line.match(/^[a-z0-9]{7}/) {|m| puts line } }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Determine the instance ID of the current instance | |
ec2-metadata | awk '/instance-id:/ {print $2}' | |
# Determine the 'type' of an instance based on the tags applied to it. | |
ec2-describe-tags | grep $(ec2-metadata | awk '/instance-id:/ {print $2}') | awk '/type/ {print $5}' |
OlderNewer