This file contains 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains 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
voices = %w(Agnes Kathy Princess Vicki Victoria) | |
("a".."z").each do |letter| | |
`say -v #{voices.shuffle.first} "#{letter}"` | |
end |
This file contains 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
@mixin stretch-link { | |
& { position: relative; } | |
a { position: absolute; height: 100%; width: 100%; } | |
} |
This file contains 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
require "thread" | |
$mutex = Mutex.new | |
$total = 0 | |
def incr | |
$mutex.synchronize { $total += 1 } | |
sleep | |
end |
This file contains 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
source :rubygems | |
gem 'sinatra', '1.0' | |
gem 'oauth2' | |
gem 'json' | |
group :development do | |
gem 'shotgun' | |
end |
This file contains 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
# | |
# Domain Validator by Frank Rietta | |
# (C) 2012 Rietta Inc. All Rights Reserved. | |
# Licensed under terms of the BSD License. | |
# | |
# To use in a validation, add something like this to your model: | |
# | |
# validates :name, :domain => true | |
# | |
class DomainValidator < ActiveModel::EachValidator |
This file contains 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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
Motion::Project::App.setup do |app| | |
# Use `rake config' to see complete project settings. | |
app.name = 'HelloMailCore' | |
# Configure MailCore | |
app.vendor_project("vendor/MailCore", :xcode, :headers_dir => "{../include,libetpan/build-mac/.build/include/libetpan}", :target => "MailCore iOS") |
This file contains 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
// setting auth data retrieved from Ti.Facebook login | |
authData = { | |
"facebook" : { | |
"id" : Ti.Facebook.uid, | |
"access_token" : Ti.Facebook.accessToken, | |
"expiration_date" : expDate, // "format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" | |
} | |
}; | |
// Either way I resolved the problem, calling _handleSaveResult(true) on the returned user object, |
This file contains 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
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz | |
tar -xvzf ruby-1.9.3-p429.tar.gz | |
cd ruby-1.9.3-p429/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains 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
# DOCKER-VERSION 0.6.4 | |
# 13.10 - 04 has a missing ppa for postgresql 9.2 at the moment (26/10/2013) | |
FROM ubuntu:12.10 | |
MAINTAINER Sam Saffron "https://twitter.com/samsaffron" | |
RUN apt-get -y update &&\ | |
apt-get -y upgrade &&\ | |
apt-get -y install software-properties-common &&\ |