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
* Must NOT use class="required" validation | |
* Must use Javascript objects for validation | |
var schema = { | |
options : { | |
'bubble' : true, // Bubble validation checks to all elements, if false will stop on fail | |
'blur' : false, // Will not call the validate method on the inputs | |
'auto' : false, // Will not attempt to apply to all forms, just ID matched forms | |
'decorator' : 'inline' // Defaults to supplied decorator, but a decorator can be supplied |
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
1) Install the PL2303 Lion driver from http://changux.co/osx-installer-to-pl2303-serial-usb-on-osx-lio | |
2) Install the CrossOver trial http://www.codeweavers.com/products/cxmac/ | |
3) Install the 'LED Mini Board' software as a CrossOver app http://www.prolific.com.tw/eng/downloads.asp?id=31 | |
4) Plug in your device, then symlink the mounted device in /dev to the `dosdevices` folder in your CrossOver app | |
cd ~/Library/Application\ Support/CrossOver/Bottles/Setup.exe/dosdevices # Where Setup.exe is the CrossOver app that was created | |
ln -s /dev/cu.PL2303-00001004 com1 # Your /dev/ mount name may be slightly different |
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
require 'resque/tasks' | |
namespace :resque do | |
task :setup => :environment | |
# From https://gist.github.com/1870642 | |
desc "Restart running workers" | |
task :restart_workers => :environment do | |
Rake::Task['resque:stop_workers'].invoke | |
Rake::Task['resque:start_workers'].invoke | |
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
# Checks that the precompile list contains this file or raises an error, in dev only | |
# Note: You will need to move config.assets.precompile to application.rb from production.rb | |
def javascript_include_tag *sources | |
sources.each do |source| | |
raise "Hey, #{source} is not in the precompile list. This will fall apart in production." unless Rails.application.config.assets.precompile.any? do |matcher| | |
if matcher.is_a? Proc | |
matcher.call(source) | |
elsif matcher.is_a? Regexp | |
matcher.match(source) | |
else |
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
# install git | |
sudo aptitude -y install curl git git-core | |
# get the vmconfig repo | |
git clone [email protected]:learnable/vmconfig.git | |
cd vmconfig | |
# start the automated script | |
./learnable-development-vm.sh |
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
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
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 App.ProjectsController extends App.ApplicationController | |
@scope 'all' | |
@show: (a,b,c) => | |
console.log "SHOWING" | |
# How do I get my model. Is this just completely wrong? | |
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
def index | |
filters = {} | |
filters[:categories_filter] = params[:categories].split(',') unless params[:categories].blank? | |
filters[:questions_filter] = params[:questions].split(',') unless params[:questions].blank? | |
@questions = QuestionFilter.new(filters).questions | |
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
require 'formula' | |
class Cgminer < Formula | |
homepage 'https://github.com/ckolivas/cgminer' | |
url 'https://github.com/ckolivas/cgminer/archive/v2.11.4.zip' | |
head 'https://github.com/ckolivas/cgminer.git', :using => :git | |
md5 'd41d210b03ee16c9ad4cfb439916b30a341dc9b6' | |
depends_on 'autoconf' => :build | |
depends_on 'automake' => :build |
OlderNewer