Steps taken with a basic Raspbian install.
Default username/password is pi
/raspberry
.
SSH access is enabled by default; run ifconfig
on the Pi to find the IP address to connect to.
Bring everything up-to-date:
require 'benchmark' | |
def fib_vanilla(n) | |
return n if (0..1).include?(n) | |
fib_vanilla(n - 1) + fib_vanilla(n - 2) | |
end | |
fib_memoized = Hash.new { |numbers, index| | |
numbers[index] = fib_memoized[index - 2] + fib_memoized[index - 1] | |
}.update(0 => 0, 1 => 1) |
SinOsc s => dac; | |
while(true) { | |
100::ms => now; | |
Std.rand2f(30.0, 1000.0) => s.freq; | |
} |
// Kids, this is a bad idea. Don't try this at home. | |
// | |
// npm install csv-spectrum | |
// | |
var CSV_REGEX = /^(([^,"]+)|("([^"]|"")*"))(,(([^,"]+)|("([^"]|"")*")))*$/; | |
var spectrum = require('csv-spectrum'), | |
passed = 0, | |
failed = 0; |
<?xml version="1.0" encoding="UTF-8"?> | |
<json:object | |
xsi:schemaLocation="http://www.datapower.com/schemas/json jsonx.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx"> | |
<json:string name="reply">Here's how you would encode a reply to your tweet!</json:string> | |
</json:object> |
class MilesConverter | |
CONVERSIONS = { | |
km: 1.6, | |
m: 1.6 * 1000, | |
cm: 1.6 * 1000 * 100, | |
mm: 1.6 * 1000 * 100 * 10, | |
whatever: 103321 | |
} | |
attr_reader :miles |
class DonutShop | |
PRICES = | |
pink: 3.30 | |
glazed: 5.00 | |
sprinked: 4.40 | |
constructor: (@name, @flavoursome = true) -> | |
@todaysRevenue = 0 | |
serve: (customers) -> |
source 'https://rubygems.org' | |
gem 'rack' |