Skip to content

Instantly share code, notes, and snippets.

View ivanoats's full-sized avatar
💭
🤙 Stoked 🏄‍♂️

Ivan Storck ivanoats

💭
🤙 Stoked 🏄‍♂️
View GitHub Profile
#! /usr/bin/env ruby
# Generate all tags for all gems included by bundler in gems.tags
#
# Basically does the same as "bundle show gemname", except for all gems.
# Interestingly enough, "bundle show" without any arguments falls back to
# "bundle list", otherwise the whole thing could have been a bash one-liner.
require 'bundler'
@mazesoul
mazesoul / Klass.js
Created May 5, 2011 19:26
Super.js : micro JS Class
/*!
* Copyright (c) 2011 Laurent Villeneuve mazesoul at gmail dot com
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@Gregg
Gregg / gist:968534
Created May 12, 2011 13:54
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@ruprict
ruprict / refinerycms_blog_post.html.erb_spec.rb
Created June 30, 2011 10:46
RefineryCMS Blog partial view spec
require 'spec_helper'
describe "blog/shared/_post.html.erb" do
let (:post) do
stub_model(BlogPost,
:title => "Blog",
:published_at => Time.now
)
end
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@postmodern
postmodern / register.rb
Created July 28, 2011 07:17
Example of what is possible with RSpec2

Install RSpec

$ gem install rspec

Run it!

$ rspec --color --format=d register.rb
CashRegister
  when empty

items

@damog
damog / spotify-ichat.sh
Created August 11, 2011 19:23
Spotify to iChat and Adium statuses
#!/bin/bash
# shamelessly taken from: http://webcache.googleusercontent.com/search?q=cache:aUG0MH-OLaEJ:codesnippets.joyent.com/posts/show/1954+spotify+ichat&cd=1&hl=en&ct=clnk&gl=us&source=www.google.com
# messages have this format:
# 'Mon Jul 5 13:25:05 azeef-macbook GrowlHelperApp[46245] <Warning>: Spotify: Do the Buildings and Cops Make You Smile? (Bedroom Walls\nThe 4400) - Priority 0'
# which this script extracts as:
# 'Spotify: Do the Buildings and Cops Make You Smile? (Bedroom Walls'
# 'The 4400)'
# or (a little more abstract):
@ppworks
ppworks / Guardfile.diff
Created August 26, 2011 12:05
"Could not start Spork server for RSpec" when guard start.
diff --git a/Guardfile b/Guardfile
index 90843a8..6ffae21 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,7 +1,7 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
-guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
+guard 'spork', :wait => 60, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
@jbjornson
jbjornson / open_filename_under_cursor.py
Created September 1, 2011 13:09
Open the filename from either the current selection or the clipboard. If neither of these are files, then create a new filename based on the selection.
import sublime, sublime_plugin
import os.path, string
VALID_FILENAME_CHARS = "-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\")
# { "keys": ["alt+o"], "command": "open_filename_under_cursor" }
# https://gist.github.com/1186126
class OpenFilenameUnderCursor(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
@cblunt
cblunt / Gemfile
Created October 21, 2011 08:55
Configure Carrierwave for Amazon S3 Storage and Heroku
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL