This file contains hidden or 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 hidden or 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 hidden or 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 = []; |
This file contains hidden or 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
var attemptLogin = function() { | |
var validateResult = function(e, result) { | |
if (e) { | |
Meteor.loginWithGoogle(); | |
} | |
}; | |
Accounts.callLoginMethod({methodArguments: [{}], userCallback: validateResult}); | |
}; |
This file contains hidden or 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 hidden or 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
objectManager = [RKObjectManager managerWithBaseURLString:kAPIBaseURL]; | |
objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:kDataStore]; | |
objectManager.objectStore = objectStore; | |
// Set up object mappings, relationships, etc. e.g. | |
RKObjectMapping *collectionMapping = [Item mappingInStore:objectStore]; | |
// Pagination mapping | |
RKObjectMapping *paginationMapping = [RKObjectMapping mappingForClass:[RKObjectPaginator class]]; | |
[paginationMapping mapKeyPath:@"pagination.page" toAttribute:@"currentPage"]; |
This file contains hidden or 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
// Add this to your ~/Library/Application Support/Propane/unsupported/caveatPatchor.js | |
var nyanForNyan = true; | |
if (nyanForNyan) { | |
Campfire.NyanForNyan = Class.create({ | |
initialize: function(chat) { | |
this.chat = chat; | |
}, |
This file contains hidden or 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
enable-messages-help: true | |
broadcast-snoop-target: '[Everyone]' | |
broadcast-reload-target: '[Operators]' | |
broadcast-break-target: '[Everyone]' | |
enable-messages-error: true | |
enable-messages-user: true | |
enable-messages-owner: false | |
enable-messages-admin: true | |
enable-protection-doors: true | |
default-door-timer: 0 |
This file contains hidden or 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
database: | |
port: 3306 | |
username: '' | |
prefix: '' | |
hostname: '' | |
cleanser: | |
age: 14d | |
deletes-per-operation: 20000 | |
type: H2 | |
password: '' |
This file contains hidden or 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
require 'coffee_script' | |
require 'rake/clean' | |
def coffee_to_js(coffee) | |
File.join(BUILDDIR, File.dirname(coffee.split('/')[1..-1].join('/')), File.basename(coffee).ext('js')) | |
end | |
JSFILE = 'app.js' | |
JSPATH = "_attachments/js/app/#{JSFILE}" | |
COFFEE = FileList['coffeescript/**/*.coffee'] |