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
describe "actions on rails init" do | |
# Tiffany should hook in to the rails init in development | |
# mode and generate the specification | |
before(:all) do | |
# Generate a rails application | |
@app_location = File.join(FileUtils.pwd,'spec') | |
FileUtils.cd(@app_location) | |
`rails test_app` | |
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 | |
require 'rubygems' | |
require 'RMagick' | |
include Magick | |
class BoothPhoto | |
IMAGES_ROWS = 2 | |
BORDER = 5 |
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
# Don't change this file! | |
# Configure your app in config/environment.rb and config/environments/*.rb | |
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) | |
module Rails | |
class << self | |
def boot! | |
unless booted? | |
preinitialize |
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
plugin_root = File.expand_path("../../..", __FILE__) | |
self.instance_eval File.read("#{plugin_root}/Gemfile") #Copying in the gem file from the parent | |
gem 'the_name_of_the_gem_goes_here', :path => plugin_root |
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
# To go in base of gem spec folder | |
begin | |
require "rubygems" | |
require "bundler" | |
rescue LoadError | |
raise "Could not load the bundler gem. Install it with `gem install bundler`." | |
end | |
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") |
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
namespace "testbed" do | |
RAPPNAME = "test_app" #This is also hardcoded in the spec/spec_helper.rb and gitignore file. Change it there too... | |
desc "Install rails base app in spec dir" | |
task :build_app do | |
directory "spec" | |
chdir("spec") do | |
sh "rails #{RAPPNAME}" | |
puts "Put a test_app in the spec folder" |
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
/******************************************************** | |
** More info about the project at: ** | |
** http://lusorobotica.com/viewtopic.php?t=103&f=106 ** | |
** by TigPT at [url=http://www.LusoRobotica.com]www.LusoRobotica.com[/url] ** | |
*********************************************************/ | |
int dirPin = 2; | |
int stepperPin = 3; | |
void setup() { | |
pinMode(dirPin, OUTPUT); |
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
set nocompatible | |
set backspace=indent,eol,start | |
set directory^=$HOME/.vim_swap// "put all swap files together in one place | |
" Switch syntax highlighting on, when the terminal has colors | |
" Also switch on highlighting the last used search pattern. | |
if &t_Co > 2 || has("gui_running") | |
syntax on | |
set hlsearch |
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
# AMI EC2 /etc/rc.local snipit I could not get to work | |
META_HOSTNAME = `ec2-describe-tags --filter "resource-type=instance" --filter "resource-id=$(ec2-metadata -i | cut -d ' ' -f2)" --filter "key=Name" | cut -f5` | |
hostname $META_HOSTNAME |
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
To list the USB connections | |
ls /dev/ttyUSB* | |
To start a USB screen session with the BB | |
sudo screen /dev/ttyUSB0 115200 | |
To Eject a mounted BB | |
sudo eject /dev/sdx - where ‘x’ is the id for the device to exject |
OlderNewer