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 'http://rubygems.org' | |
gem 'rails' | |
gem 'ejs' | |
gem 'i18n-js', :git => 'git://github.com/fnando/i18n-js.git' | |
gem 'jquery-rails' | |
gem 'airbrake' | |
gem 'thin' | |
group :assets do |
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
// | |
// Alert.h | |
// | |
// Created by Brian Norton on 1/4/14. | |
// Copyright (c) 2014 Brian Norton. MIT. | |
// | |
#import <UIKit/UIKit.h> | |
@interface Alert : UIAlertView <UIAlertViewDelegate> { |
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
## :write | |
# -1 : Don't verify writes and raise no network errors | |
# 0 : Don't verify writes and raise network errors | |
# 1 : Verify writes on the primary node. (default) | |
# n : Verify writes on n number of nodes. | |
# | |
## :read | |
# :primary : Will always read from a primary node. (default) | |
# :primary_preferred : Attempt a primary first, then secondary if none available. | |
# :secondary : Will always read from a secondary node. |
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
var url = 'yourapp://link/305923', | |
iframe = '<iframe src="'+ url + '" style="display:none;"></iframe>'; | |
$('body').append(iframe); |
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
class Array | |
def to_proc | |
->(item) do | |
self.each do|meth| | |
item = item.send meth | |
end | |
item | |
end | |
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
puts records.inspect | |
# #=> [ | |
# {"id": 1, "created_at": 2014-06-04 06:07:31 -0700}, | |
# {"id": 2, "created_at": 2014-06-07 09:03:11 -0700}, | |
# {"id": 3, "created_at": 2014-06-09 07:47:18 -0700} | |
# ] | |
records.each_with_object(Hash.new { 0 }) do |record, hash| | |
hash[record['created_at'].to_date.beginning_of_week] += 1 | |
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
// | |
// ALAssetsLibrary+CoreExt.h | |
// | |
// Created by Brian Norton on 6/14/14. | |
// | |
@interface ALAssetsLibrary (CoreExt) | |
+(ALAssetsLibrary *)library; |
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
<!-- ... --> | |
<%= javascript_include_tag 'test' if Rails.env.test? %> | |
<!-- ... --> |
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
class ApplicationController < ActionController::Base | |
before_action :skip_session | |
private | |
def skip_session | |
request.session_options[:skip] = true | |
end | |
end |
OlderNewer