This file contains 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
<head> | |
<title>searchy</title> | |
</head> | |
<body> | |
{{> searchy}} | |
</body> | |
<template name="searchy"> | |
<h1>Searchy</h1> |
This file contains 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
function upInThis(array, value) { | |
for (var i = 0; i < array.length; i++) { | |
if (array[i] == value) return true; | |
} | |
return false; | |
} | |
function sayItProud(msg) { | |
message = this.chat.transcript.insertPendingMessage(msg); | |
new Campfire.OutgoingMessage(this.chat, message, msg, '').send(); |
This file contains 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
#include <Adafruit_NeoPixel.h> | |
#define PIN 8 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800); | |
// LED strip, 3 LEDs per segment, standard 7 segment LED layout | |
unsigned long DigitBytes[] = { | |
0x0003FFFF, // 0 |
This file contains 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
const int buzzerPin = 6; | |
// Trick these 4 out for accuracy | |
const int songLength = 17; | |
char notes[] = "efg dab bbbbbaagg"; | |
int beats[] = {1,2,5,3,2,4,2,5,2,2,2,2,3,3,3,3,2}; | |
int tempo = 90; | |
// Boom. Gold. | |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strconv" | |
"sync" | |
) |
This file contains 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
(START) | |
@SCREEN | |
D=A | |
@cur | |
M=D // Sets CUR to SCREEN | |
(LOOP) | |
@KBD // read from keyboard, 0=nothing pressed | |
D=M |
This file contains 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
@R2 // A = 2 | |
M=0 // Memory[2] = 0 | |
(LOOP) | |
@R1 // A = 1 | |
M=M-1 // Memory[1] = Memory[1] - 1 | |
D=M // D = Memory[1] | |
@END | |
D;JLT // Jump to @END if D < 0 | |
@R0 // A = 0 | |
D=M // D = Memory[0] |
This file contains 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
long maxSampleCount = SAMPLE_RATE * DURATION; | |
long sampleCount = 0; | |
UInt32 bytesToWrite = 2; | |
double wavelengthInSamples = SAMPLE_RATE / hz; | |
while (sampleCount < maxSampleCount) { | |
// for (int i = 0; i < wavelengthInSamples; i++) { | |
// // Square wave | |
// SInt16 sample; | |
// if (i < wavelengthInSamples/2) { |
This file contains 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
function sayIt(msg) { | |
message = this.chat.transcript.insertPendingMessage(msg); | |
new Campfire.OutgoingMessage(this.chat, message, msg, '').send(); | |
this.chat.dispatch('messageSpoken', message); | |
} | |
Campfire.Speaker.Filters.push( | |
function(message) { | |
if(message.match(/^\/soundlist\s*$/)) { | |
var soundList = []; |
NewerOlder