Skip to content

Instantly share code, notes, and snippets.

#include "SPI.h"
#include "WiFly.h"
#define RED 5
#define YELLOW 6
#define GREEN 7
#include "Credentials.h"
WiFlyClient client("example.com", 80);
#define RED 5
#define YELLOW 6
#define GREEN 7
#define INDICATOR 13
#define BUTTONINTERRUPT 0 // This is pin 2 on the arduino board
#define BOUNCE_DURATION 30 // define an appropriate bounce time in ms for your switches
#define FLASH_DELAY 1000
# Newbie Programmer
def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)
#! /usr/bin/env ruby
if !ARGV[0]
puts "Usage: append_jpg.rb path-to-naked-files"
exit
end
dir = Dir.open(ARGV[0])
files = []
dir.each do |f|