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:
// 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; |
SinOsc s => dac; | |
while(true) { | |
100::ms => now; | |
Std.rand2f(30.0, 1000.0) => s.freq; | |
} |
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) |
Ideas:
vendor/assets
from Sprockets environmentGoal:
what I'd like to do: use a combination of bower, npm, or
vendor/assets
for front-end deps, use browserify for JS compilation, use sprockets for CSS and asset hashes
require 'redis' | |
require 'benchmark' | |
hash = {} | |
array = nil | |
redis = Redis.new | |
n_values = 720 | |
redis.del redis.keys("demo:*") | |
require 'time' | |
june_first = DateTime.new(2014, 6, 1) | |
june_second = DateTime.new(2014, 6, 2) | |
june_first > june_second # => false | |
(june_first..june_second).max == june_second # => true | |
(june_first..june_second).min == june_first # => true | |
# Range#max and #min return nil if the first value in range is larger than the last value. |
activate :asset_host | |
# Will generate asset1.example.org...asset4.example.org deterministically | |
set :asset_host do |asset| | |
"//asset%d.example.org" % (asset.hash % 4 + 1) | |
end |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
var Candidacy = function(applicant) { | |
this.applicant = applicant; | |
}; | |
Candidacy.SCORE_DIMENSIONS = [ | |
'creativity', | |
'socialMediaEngagement', | |
'freshGraduate', | |
'passionate', | |
'workEthic' |