Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
loading...

Eddy Hernandez eddywashere

🔥
loading...
View GitHub Profile
View grunt config
grunt.registerMultiTask('deploy', 'deploy program to cloud', function() {
var pkgcloud = require('pkgcloud')
, walk = require('walk')
, fs = require('fs')
, done = this.async()
, self = this;
grunt.log.w
@eddywashere
eddywashere / awesome.zsh-theme
Last active Dec 10, 2015
An awesome oh-my-zsh theme
View awesome.zsh-theme
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
svn info >/dev/null 2>/dev/null && echo 'ಠ_ಠ' && return
echo '○'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
@eddywashere
eddywashere / susy-non-semantic-grid.css
Last active Dec 14, 2015
A Non Semantic Grid with Susy
View susy-non-semantic-grid.css
.col-1 {
width: 6.85484%;
float: left;
margin-right: 1.6129%;
display: inline;
}
.col-2 {
width: 15.32258%;
float: left;
@eddywashere
eddywashere / secret.rake
Last active Dec 17, 2015 — forked from SFEley/secret.rake
Open an encrypted data bag item or create it if it doesn't exist. Takes two arguments, databag and item name.
View secret.rake
namespace :secret do
desc "Edit an encrypted data bag item in EDITOR"
task :edit, :data_bag, :bag_item do |t, args|
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
puts "or"
puts "export EDITOR='subl -w'"
exit 1
end
@eddywashere
eddywashere / frontend.md
Last active Dec 24, 2015
My resources for keeping up with frontend design and web development
View frontend.md
@eddywashere
eddywashere / gist:7575099
Created Nov 21, 2013
js snippet for outputting stylesheets, rule count and selector count
View gist:7575099
var
styleSheets = document.styleSheets,
totalStyleSheets = styleSheets.length;
for (var j = 0; j < totalStyleSheets; j++){
var
styleSheet = styleSheets[j],
rules = styleSheet.cssRules,
totalRulesInStylesheet = rules.length,
totalSelectorsInStylesheet = 0;
@eddywashere
eddywashere / .gitignore
Created Jan 7, 2014
global .gitignore file
View .gitignore
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
/db/*.sqlite3
/log/*.log
@eddywashere
eddywashere / bash.sh
Created Jan 25, 2016
conditional docker-machine eval
View bash.sh
# assumes your docker-machine is called "dev"
docker_running=$(docker-machine ls | grep dev)
if [[ "$docker_running" == *"Stopped"* ]]
then
echo "fyi - docker not running"
elif [[ "$docker_running" == *"Running"* ]]
then
eval "$(docker-machine env dev)"
fi
View mongoose-schematypes.js
var schema = new Schema({
name: String,
binary: Buffer,
living: Boolean,
updated: { type: Date, default: Date.now }
age: { type: Number, min: 18, max: 65 }
mixed: Schema.Types.Mixed,
_someId: Schema.Types.ObjectId,
array: [],
ofString: [String],
@eddywashere
eddywashere / Asana.md
Created Sep 3, 2016
Asana onboarding
View Asana.md