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
CGRect newFrame = CGRectMake(_menuView.frame.size.width*-1, _menuView.frame.origin.y, _menuView.frame.size.width, _menuView.frame.size.height); | |
_menuView.frame = CGRectMake(0, _menuView.frame.origin.y, _menuView.frame.size.width, _menuView.frame.size.height); | |
[UIView animateWithDuration:0.5 | |
animations:^{ | |
_menuView.frame = newFrame; | |
}]; |
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
God.watch do |w| | |
pid_file = "#{RAILS_ROOT}/tmp/pids/sidekiq.pid" | |
w.name = 'sidekiq' | |
w.interval = 30.seconds | |
w.start = "cd #{RAILS_ROOT} && RAILS_ENV=#{RAILS_ENV} bundle exec sidekiq -C #{RAILS_ROOT}/config/sidekiq.yml -P #{pid_file} -e #{RAILS_ENV} -L #{RAILS_ROOT}/log/sidekiq.log -d" | |
w.stop = "bundle exec sidekiqctl quiet #{pid_file}" | |
w.start_grace = 10.seconds | |
# restart if memory gets too high |
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
Failure/Error: Net::HTTP.get_response(URI.parse('http://google.com')).code.should == 301 | |
ArgumentError: | |
cannot interpret as DNS name: nil | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:1176:in `create' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:1022:in `generate_candidates' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:1047:in `resolv' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:513:in `each_resource' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:406:in `each_address' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:115:in `block in each_address' | |
# /Users/bartolsthoorn/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/resolv.rb:114:in `each' |
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
Failure/Error: Net::HTTP.get_response(URI.parse('http://google.com')).to_i.should == 301 | |
ArgumentError: | |
cannot interpret as DNS name: nil |
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
require 'rvm/capistrano' | |
set :rvm_bin_path, '/usr/local/rvm/bin' | |
set :rvm_path, '/usr/local/rvm' | |
set :rvm_ruby_string, '1.9.3-p385' |
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
require 'selenium-webdriver' | |
client = Selenium::WebDriver::Remote::Http::Default.new | |
client.timeout = 1 # seconds | |
driver = Selenium::WebDriver.for( | |
:chrome, | |
:http_client => client, | |
:switches => %w[--ignore-certificate-errors --disable-popup-blocking --disable-translate] | |
) |
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
class A | |
class B | |
class C | |
def foo | |
puts "Boo" | |
end | |
end | |
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
// | |
// NVHighpassFilter.h | |
// NVDSP | |
// | |
// Created by Bart Olsthoorn on 18/05/2012. | |
// Copyright (c) 2012 Bart Olsthoorn. All rights reserved. | |
// | |
#import "NVDSP.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
// | |
// NVHighpassFilter.m | |
// NVDSP | |
// | |
// Created by Bart Olsthoorn on 18/05/2012. | |
// Copyright (c) 2012 Bart Olsthoorn. All rights reserved. | |
// | |
#import "NVHighpassFilter.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
// MULTIPLE SIGNAL GENERATOR! | |
__block float *phases = nil; | |
[audioManager setOutputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels) | |
{ | |
float samplingRate = audioManager.samplingRate; | |
NSUInteger activeSignalCount = [tones count]; | |
// Initialize phases | |
if (phases == nil) { | |
phases = new float[10]; |