Skip to content

Instantly share code, notes, and snippets.

View adamstac's full-sized avatar

Adam Stacoviak adamstac

View GitHub Profile
#!/bin/bash
if [ -z "$1" ]; then
wdir="."
else
wdir=$1
fi
for f in $( find . -name '*.erb' ); do
out="${f%.erb}.haml"
if [ -e $out ]; then
@adamstac
adamstac / id_rsa.pub - iMac-i7-adam@adamstacoviak.com
Created March 30, 2010 20:46
SSH key for adam@adamstacoviak.com
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwbL4TrsWIMvdsp5alLc1fRzOc3dk/4+4AnTlCPQBphftLjP8eOZsqQRiumzcs3EUjvj6g9+fLXBtBJUMPfVvVtU4h0MpElRNuSlrUoWvbgJ+swH4ysMrn/KTqOSEtg/Fis6BFEdclVqsN/C81LB71ipg+HMJu/U0WOjt59lrBcqjJCNIZJlj4tpH4YH1jNwXwF0z5FxaCdjABLN8MVFUa7gdBvLJ9KtVTf03839MyD2pNIFjOHmSq/egGb2p5wy3roiotdeWbxlGMa2B9P5/HHFhlT53WN/Opb2p7k2uX+Tm/6BKvjYpALlEnqnzhI3djBvajCL8RLostGQkg+FsDw== adam@adamstacoviak.com
## throw this at the top of your .bash_profile
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer.
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc).
# Install rvm (no sudo!)
# ------------------------------------------------------
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
source ~/.rvm/scripts/rvm
rvm install ree-1.8.7-2010.02
@imathis
imathis / _extensions.sass
Created November 5, 2010 18:58
Creates a nice 3D ribbon effect with CSS only
=gradient-bg($color, $top: 5, $bottom: $top)
@if $top < 0 and $bottom < 0
$color1: darken($color, abs($top))
$color2: lighten($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
@else
$color1: lighten($color, abs($top))
$color2: darken($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
background-color: $color
@adamstac
adamstac / styles.rake
Created November 20, 2010 03:40
A set of rake tasks for clearing, compiling and generating stats on your Sass stylesheets (Compass required).
namespace :styles do
# STATS
desc "Generate stats"
task :stats => ["stats:default"]
namespace :stats do
task :default do
@adamstac
adamstac / social-signin.css
Created December 14, 2010 19:23
An example of using the sprite helper in Compass
li.twitter-signin {
margin-right: 10px;
}
li.facebook-signin a, li.twitter-signin a {
background: url('/images/btn/social-signin-sprite.png?1292353729') no-repeat;
width: 150px;
height: 22px;
overflow: hidden;
text-indent: -99999px;
width: 150px;
@adamstac
adamstac / grid-coordinates-1.1.2-example.sass
Created January 23, 2011 11:48
Sample Sass and CSS output from Grid Coordinates 1.1.3
// Configure grid coordinates
$grid-columns: 24
$grid-width: 30px
$grid-gutter-width: 10px
// Set to true by default. Can be set to false to clip content that overflows a grid block
// $overflow: false
@import grid-coordinates
+grid-coordinates
@adamstac
adamstac / TODO
Created February 11, 2011 18:50
A Rubyist’s guide to setting up a Mac OS X development environment using Homebrew, RVM, Git and Bundler
* Review this article and add new steps as needed: http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html
@nathansmith
nathansmith / moz-webkit.css
Created March 22, 2011 01:51
Target Firefox and WebKit via hacky CSS.
/*
Read more here:
https://developer.mozilla.org/en/CSS/@-moz-document
For more browser-specific hacks:
http://paulirish.com/2009/browser-specific-css-hacks
*/
@-moz-document url-prefix() {
/* Put your Firefox specific code here. */