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
if Rails.env == 'development' | |
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def before_dispatch_with_quiet_assets(env) | |
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0 | |
end | |
alias_method_chain :before_dispatch, :quiet_assets | |
end | |
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
// HOW THE FUCK TALL DOES MY TEXT VIEW NEED TO BE?!? | |
@interface UITextView (WhatFuckingSize) | |
+ (CGSize)sizeThatFuckingFits:(CGSize)size withAttributedText:(NSAttributedString *)attributedText textContainerInsets:(UIEdgeInsets)textContainerInsets; | |
@end | |
static UITextView *FuckingTextView; | |
@implementation UITextView (WhatFuckingSize) |
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
@interface MyScene : SKScene | |
// this is the node that will be scrolled and zoomed | |
@property (nonatomic, strong) SKSpriteNode *nodeToScroll; | |
@property (nonatomic) CGFloat zoomScale; | |
@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
#!/usr/bin/env ruby | |
puts(lambda{|q|until(!(c||=Hash.new{|e,o|e[o]=[o<((q<=3) ? 2*q : | |
((q)*(p||=Proc.new{|l|Math.log(l)})[q]+q*p[p[q]])),true]})[(t||=2)][0])do | |
while((c[s||=(t**2)][1]=false)!=c[(s+=t)-t][0])do{}end unless(!c[t][1]) | |
t,s=t+1;end;c.select{|w,j|j[1]}.keys.first(q)}[ARGV.last.to_i]) |