This is now an actual repo:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pbxproj -crlf -diff -merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module VarAccessor | |
Sass::Script::Functions.send :include, self | |
def self.variables | |
@variables ||= {} | |
end | |
def self.set(values = {}) | |
variables.merge! values | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/concerns/let.rb | |
# Ripped from Rspec 2.0 beta.12 | |
# I've found it so useful in Rspec, I made it into a module. Controller code with shared | |
# code seem to have a lot of use for this. For example, in inherited_resources, you would | |
# typically override model, parent, etc. to configure it. You would typically memomize it | |
# as well. With this, you can use a more compact let() syntax. | |
# (Note: This code will only work in Rails 3) | |
module Let |
This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
- Install Gems with Bundler with
bundle install
- Define your guards with
mate Guardfile
- Initialize Jasmine with
bundle exec jasmine init
- Configure Jasmine with
mate spec/support/yasmine.ym
- Start Guard with
bundle exec guard
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BackButton = Ext.extend(Ext.Button, { | |
ui: 'back', | |
text: 'Back', | |
hidden: true, | |
id: 'back', | |
handler: function() { | |
var dispatchOptions = this.backStack.pop(); | |
Ext.dispatch(dispatchOptions); | |
if(this.backStack.length == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 cedmax <http://github.com/cedmax> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Listing < ActiveRecord::Base | |
set_table_name :Listing | |
scope :near, lambda{ | |
|*args| | |
origin = *args.first[:origin] | |
if (origin).is_a?(Array) | |
origin_lat, origin_lng = origin | |
else | |
origin_lat, origin_lng = origin.latitude, origin.longitude |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coderwall.coffee | |
# Display coderwall.com badges | |
username = "hermanjunge" | |
el = $(".coderwall") | |
$.getJSON "http://www.coderwall.com/#{username}.json?callback=?", (data) -> | |
el.empty() | |
for item in data.data.badges | |
$("<img>") | |
.attr( |
OlderNewer