As configured in my dotfiles.
start new:
tmux
start new with session name:
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>Video recording demo</title> | |
| <link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="container"> |
| /* This implementation does DCT-II on iOS, using the iOS vDSP FFT methods. Supposedly this is faster than in plain C (i.e. FFTW), but I didn't do any tests to support this claim. For one thing, as far as I understand it, doing DCT takes less clock cycles than FFT, and using this code we do an FFT of size 2N for a DCT of size N (and then some post processing. Anyone is welcome to comment :) | |
| This code was developed using the following 2 sources, and I owe great gratitude to their authors: http://developer.apple.com/library/ios/#documentation/Performance/Conceptual/vDSP_Programming_Guide/UsingFourierTransforms/UsingFourierTransforms.html and http://www.hydrogenaudio.org/forums//lofiversion/index.php/t39574.html | |
| I don't claim I understand everything I do, but the thing is, it works -- as in, it gives me the same result as jtransform with scaling on :) And it's fast enough for my use: on the iPhone 4S I can get 320 DCTs of length 2048 per second. Perhaps I can improve this with some further tweaking (although I' |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # ... | |
| gem 'carrierwave' | |
| gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL |
| public class MyLibrary { | |
| public static final String XMLNS = "http://mylib.com/schema" | |
| } | |
| // in widget class | |
| public class MyWidget { | |
| public MyWidget(Context context, AttributeSet attrs) { | |
| // don't use obtainStyledAttributes, but getAttributeResourceValue: | |
| int myAttr = attrs.getAttributeResourceValue(MyLibrary.XMLNS, "myAttr", -1); |
| #!/usr/bin/env ruby | |
| # Libraries::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
| require 'rubygems' | |
| require 'sinatra/base' | |
| require 'slim' | |
| require 'sass' | |
| require 'coffee-script' | |
| # Application::::::::::::::::::::::::::::::::::::::::::::::::::: |
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |