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 CT | |
module Git | |
def self.sha(repo) | |
result = `cd "#{repo}" && git log -1 --format=%H`.strip | |
return result =~ /^[0-9a-f]{40}$/ ? result : nil | |
end | |
end | |
end | |
config :sproutcore, :build_number => CT::Git::sha('frameworks/sproutcore') |
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
# @session and @mock_project instance variables are defined elsewhere. | |
before(:each) do | |
joins = mock(ActiveRecord::Relation) | |
ProjectUser.should_receive(:joins).with(:project_user_datum).and_return(joins) | |
joins.should_receive(:where). | |
with('project_user_data.project_id = :project_id', { :project_id => @mock_project }). | |
and_return(@mock_project) | |
get :index, {}, @session | |
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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/2323328) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p125 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
// (c) 2010 Cameron Westland, Big Bang Technology Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://bigbangtechnology.github.com/stately | |
/** | |
Example: | |
var MyView = Backbone.View.extend(Stately).extend({ | |
states: { | |
EDITING: "editing", |
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
# Font Squirrel Font-face Generator Configuration File | |
# Upload this file to the generator to recreate the settings | |
# you used to create these fonts. | |
{"mode":"expert","formats":["ttf","woff","eot","svg"],"tt_instructor":"default","options_subset":"advanced","subset_custom":"","subset_custom_range":"f000-f073,f200-f273","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"} |
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
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { | |
if let digit = Int(string) { | |
amount = amount * 10 + digit | |
textField.text = String(describing: currencyAmount()!) | |
} else if string == "" { | |
amount = amount / 10 | |
textField.text = String(describing: currencyAmount()!) | |
} |
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
// | |
// CurrencyDelegate.swift | |
// TextFieldDelegate | |
// | |
// Created by Timothy Isenman on 12/10/17. | |
// Copyright © 2017 Timothy Isenman. All rights reserved. | |
// | |
import Foundation | |
import UIKit |