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
source 'https://rubygems.org' | |
RAILS_VERSION = '~> 3.2.8' | |
gem 'activesupport', RAILS_VERSION, :require => 'active_support' | |
gem 'actionpack', RAILS_VERSION, :require => 'action_pack' | |
gem 'actionmailer', RAILS_VERSION, :require => 'action_mailer' | |
gem 'activeresource', RAILS_VERSION, :require => 'active_resource' | |
gem 'railties', RAILS_VERSION, :require => 'rails' | |
gem 'tzinfo', '~> 0.3.32' |
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
// Compile with $ gcc -o lmutracker lmu.m -framework IOKit -framework CoreFoundation -framework Foundation | |
// Usage: ./lmu [now] | |
// Prints out the value from the ambient light sensor and the back light LED every 1/10 of a second. Optionally print just one value. | |
// Inspired by the code found at | |
// http://google-mac-qtz-patches.googlecode.com/svn-history/r5/trunk/AmbientLightSensor | |
// and http://osxbook.com/book/bonus/chapter10/light/ | |
// and http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Computing/2010_February_10#Mac_OS_X_keyboard_backlight_drivers | |
// http://forums.macrumors.com/showthread.php?t=1133446 | |
#include <stdio.h> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<style> | |
/*Styles*/ | |
</style> |
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
# Originally http://pastie.org/pastes/233178 | |
def reflect_on_all_associations | |
# Datamapper, you're crazy... | |
relationships.map { |name, relationship| | |
#TODO :has_and_belongs_to_many | |
if relationship.options[:min].nil? | |
macro = :belongs_to | |
if relationship.options[:class_name] | |
# In a belongs_to, the side with the class name uses | |
# the parent model, but child key for the foreign key... |
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
// DataManager.h | |
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
extern NSString * const DataManagerDidSaveNotification; | |
extern NSString * const DataManagerDidSaveFailedNotification; | |
@interface DataManager : NSObject { | |
} |
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
EventMachine | |
============ | |
Installation: | |
$ gem install eventmachine | |
Synchronous Ruby code (Not EM appropriate): | |
ret = operation(); do_something_with(ret) | |
Evented, asynchronous code (EM appropriate): |
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
Pod::Spec.new do |s| | |
s.name = 'LLRoundSwitch' | |
s.version = '1.0.1' | |
s.license = 'MIT' | |
s.summary = 'Customizable replacement for UISwitch with ARC support' | |
s.homepage = 'http://github.com/LordLobo/LLRoundSwitch' | |
s.author = { 'LordLobo' => '[email protected]' } | |
s.source = { :git => 'http://github.com/LordLobo/LLRoundSwitch.git', :commit => 'ae2fdb6d7bc7b6b0f1e96f4aadd69f7246477422' } | |
s.description = 'Customize the on/off text, the color of the background, supports event delegation, all with ARC in-mind.' | |
s.platform = :ios |
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
Pod::Spec.new do |s| | |
s.name = 'MJPopupViewController' | |
s.version = '0.0.0' | |
s.platform = :ios | |
s.summary = 'A UIViewController Category to display a ViewController as a popup with different transition effects.' | |
s.homepage = 'https://github.com/martinjuhasz/MJPopupViewController' | |
s.author = { 'Martin Juhasz' => '[email protected]' } | |
s.source = { :git => 'https://github.com/martinjuhasz/MJPopupViewController.git', :commit => '45ac970c38ed5240a111b9047cc39b5413d42f6e' } | |
s.source_files = 'Source' | |
s.frameworks = 'QuartzCore', 'CoreGraphics' |
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
Pod::Spec.new do |s| | |
s.name = 'Facebook-iOS-SDK' | |
s.version = '3.0.6.b' | |
s.platform = :ios | |
s.license = 'Apache License, Version 2.0' | |
s.summary = 'The iOS SDK provides Facebook Platform support for iOS apps.' | |
s.description = 'The Facebook iOS SDK enables you to access the Facebook Platform APIs including the Graph API, FQL, and Dialogs.' | |
s.homepage = 'http://developers.facebook.com/docs/reference/iossdk' | |
s.author = 'Facebook' | |
s.source = { :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'sdk-version-3.0.6.b' } |
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
#!/bin/bash | |
# Set the marketing version of the project. | |
# Take the number from git and apply it to the project. | |
# Any "v" prepended to the git tag will be removed. | |
# Get the current release description from git. | |
git_version=`git describe --tags` | |
# Check to see if the tag starts with with "v", and remove if so. |