This project was conceived with the idea of getting some real world language practice.
- Install the required gems.
gem install google-translate
require 'thread' | |
class ActionOnLatest | |
attr_accessor :queue, :mutex, :val | |
def initialize | |
@queue = Queue.new | |
@mutex = Mutex.new | |
end |
require 'rubygems' | |
require 'aws-sdk' | |
require 'twilio-ruby' | |
account_sid = ENV['twilio_account_sid'] | |
auth_token = ENV['twilio_auth_token'] | |
client = Twilio::REST::Client.new account_sid, auth_token | |
from = ENV['twilo_from_number'] |
[user] | |
name = <NAME> | |
email = <EMAIL> | |
[credential] | |
helper = cache --timeout=43200 | |
[core] | |
editor = nano | |
#pager = less -r |
require 'nokogiri' # swap to using REXML - may be slower but its built in to the ruby standard lib. | |
require 'optparse' | |
###################################### | |
# called like 'ruby junit-test-times.rb /home/user/project/target/surefire-reports' | |
###################################### | |
class JUnitTestTimes | |
@options = {} |
// IRLib from https://github.com/cyborg5/IRLib | |
#include <IRLib.h> | |
// RGBEffects from https://github.com/ajesler/Arduino-RGBEffects | |
#include <RGBEffects.h> | |
// if isPaused is true, update will stop being called until the lamp is unpaused. | |
int isPaused = 0; | |
// the time between effect updates. | |
int effect_delay = 2100; |
require 'sqlite3' | |
# https://github.com/mapbox/mbtiles-spec/blob/master/1.1/spec.md | |
class Mbtiles | |
attr_reader :tile_format, :db_file_name | |
def initialize(db_file_name, format=:png) | |
@db_file_name = db_file_name | |
load_database(db_file_name) |
Wa-Tor is a population dynamics simulation devised by Alexander Keewatin Dewdney
See http://home.cc.gatech.edu/biocs1/uploads/2/wator_dewdney.pdf and https://en.wikipedia.org/wiki/Wa-Tor.
gem install curses
#define D3 3 | |
#define SECONDS_PER_HOUR = 3600 | |
const int photoresistorPin = D3; | |
const int impressionsPerkWh = 1000; | |
volatile long readingStart = 0; | |
volatile long readingEnd = 0; | |
volatile boolean readingAvailable = 0; |
module CucumberStepDebugging | |
def print_step_definitions | |
step_definitions.each do |sdl| | |
puts "#{sdl.regexp_source} in #{sdl.file_colon_line}" | |
end | |
end | |
def step_definitions | |
language_map = @__cucumber_runtime.instance_variable_get("@support_code").instance_variable_get("@language_map") | |
step_definitions = language_map["rb"].instance_variable_get("@available_step_definition_hash").keys |