Skip to content

Instantly share code, notes, and snippets.

View pengwynn's full-sized avatar

Wynn Netherland pengwynn

View GitHub Profile
@kylefiedler
kylefiedler / css.snippets
Last active November 7, 2019 16:42
Vim CSS Snippets
#Sass Snippets
snippet @i
@import "${1}";
snippet ext
@extend ${1};
snippet inc
@include ${1}(${2});${3}
snippet @m
@media ${1} {
${2}
@almost
almost / models.coffee
Created November 26, 2011 20:02
The beginnings of a declarative model syntax for CoffeeScript.
# The beginnings of a declarative model syntax for CoffeeScript.
# SEE: http://almostobsolete.net/declarative-models-in-coffeescript.html
# Thomas Parslow
# Email: tom@almostobsolete.net
# Twitter: @almostobsolete
# The top part is the setup, see below that for the demo
# To see this run right away try copy pasting it into the 'Try
# CoffeeScript' box at http://jashkenas.github.com/coffee-script/
@gerred
gerred / .irbrc
Created June 17, 2011 18:27
My .irbrc file
if defined?(::Bundler)
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first
if global_gemset
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*")
all_global_gem_paths.each do |p|
gem_path = "#{p}/lib"
$LOAD_PATH << gem_path
end
end
end
# In general, there are many places in the file where you can leave off the parens in function calls, if you like.
unless typeof exports is "undefined" # `unless ... else` reads poorly in English. Better to stick to `if ... else`.
Spine = exports
else
Spine = @Spine = {}
Spine.version = "0.0.4"
$ = Spine.$ = @jQuery || @Zepto || -> arguments[0] # In Coffee, `or` is preferred over `||`.
@leshill
leshill / application_controller.rb
Created May 16, 2011 17:58
Work in progress...
#app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
before_filter :scheduler_redirect if ENV['SCHEDULER_REDIRECT']
# ...
private
def scheduler_redirect
@ernie
ernie / GoDaddy CLI
Created April 6, 2011 15:45
If GoDaddy did CLI domain registration...
$ godaddy buy wynn.fm
-- Reading CC Info from .godaddy...
-- THANK YOU FOR PURCHASING YOUR DOMAIN WITH GODADDY!
-- WHILE OUR SERVERS THINK ABOUT REGISTERING YOUR DOMAIN
-- NAME, PLEASE GIVE CAREFUL CONSIDERATION TO THE
-- FOLLOWING SPECIAL OFFERS!!!
Would you like to also register the following and SAVE 64%?
wynn.net
@guilhermechapiewski
guilhermechapiewski / Makefile
Created April 6, 2011 03:26
Utility scripts to start Titanium Mobile projects from the command line.
PROJECT_ROOT=$(shell pwd)
PROJECT_NAME=SampleApp
run:
@echo "Building with Titanium..."
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/
@PROJECT_NAME=${PROJECT_NAME} PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=iphone bash ${PROJECT_ROOT}/bin/titanium.sh
@laserlemon
laserlemon / Rails 3 Environment
Created October 1, 2010 12:17
Snow Leopard, Homebrew, Git, RVM, Ruby, Rails, Passenger, Apache, MySQL, Memcached and ImageMagick
# 2010-10-01
#
# Mac OS X 10.6.3
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.9.2, 1.8.7
# Rails 3.0.0
# Passenger 3.0.0.pre4
@alexcabrera
alexcabrera / _badgify.sass
Created September 21, 2010 21:34
SASS mixin for iOS-ish icon badges
=badgify
position: absolute
top: -5px
right: -5px
padding: 4px 8px
line-height: 16px
text-align: center
font-size: 16px
font-weight: bold
color: rgb(255, 255, 255)