Skip to content

Instantly share code, notes, and snippets.

View eddywashere's full-sized avatar
🔥
loading...

Eddy Hernandez eddywashere

🔥
loading...
View GitHub Profile
@eddywashere
eddywashere / secret.rake
Last active December 17, 2015 12:09 — 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.
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 / susy-non-semantic-grid.css
Last active December 14, 2015 11:38
A Non Semantic Grid with Susy
.col-1 {
width: 6.85484%;
float: left;
margin-right: 1.6129%;
display: inline;
}
.col-2 {
width: 15.32258%;
float: left;
@eddywashere
eddywashere / awesome.zsh-theme
Last active December 10, 2015 04:48
An awesome oh-my-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 / grunt config
Created November 30, 2012 19:48 — forked from siygle/grunt config
deploy to s3
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 / html5boilerplate.jade
Created November 11, 2012 22:06 — forked from xtian/html5boilerplate.jade
HTML5 Boilerplate in jade
!!! 5
//if lt IE 7
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
//if IE 7
<html class="no-js lt-ie9 lt-ie8">
//if IE 8
<html class="no-js lt-ie9">
//[if gt IE 8]><!
html(class='no-js')
//<![endif]
@eddywashere
eddywashere / nodeinstall.md
Last active October 8, 2015 04:58
Install nodejs for a local user with git

setup directory and clone from githhub

mkdir ~/.local

cd ~/.local

git clone https://github.com/joyent/node.git

cd node

Keybase proof

I hereby claim:

  • I am eddywashere on github.
  • I am eddywashere (https://keybase.io/eddywashere) on keybase.
  • I have a public key whose fingerprint is E3A1 3169 9CFE ED81 7DD1 A11A 7C57 AE5F 3EC5 FE34

To claim this, I am signing this object:

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 / respond-middleware.md
Last active August 29, 2015 14:07
render & redirect helper middleware

Example usage:

This middleware uses the request object to set arbitrary data available at either req.render or req.redirect;

routes.js

var setRedirect = require('respond-middleware').redirect;
var setRender  = require('respond-middleware').render;
@eddywashere
eddywashere / example.md
Last active August 29, 2015 14:06
Send Rackspace Load Balancer Logs to Loggly or console output with node.js

Create a directory for this project and install the dependencies.

npm install adm-zip loggly

Download the log files for Rackspace Cloud Load Balancers from the Cloud Files container, ex: lb_123456_lb-name_Sep_2014.

Then, create an examples directory and put the zipped log files there.