Skip to content

Instantly share code, notes, and snippets.

@oampo
oampo / list.css
Last active August 29, 2015 14:02
Pages #crumbs #no-index
ul.list {
list-style-type: none;
padding: 0;
font-size: 2em;
text-align: center;
}
@oampo
oampo / aliases.json
Last active August 29, 2015 14:02
Aliases #crumbs #no-index
{
"/work": "8ad52561445ec13c0d04",
"/about": "e63b610e2ce53f4d6aba",
"/local": "f7c18ce5e76151cbaf93"
}
@oampo
oampo / cold_mountain.html
Created June 6, 2014 11:36
Cold Mountain #crumbs
<canvas id="canvas"></canvas>
@oampo
oampo / about.md
Created June 9, 2014 10:42
About #no-index #crumbs
@oampo
oampo / local.js
Created June 10, 2014 15:12
Local #crumbs #draft
var Local = function() {
var path = document.location.pathname.split("/");
path = path[4];
var ajax = $.ajax({
url: "/" + path + "/files"
});
ajax.done(this.onGetFiles.bind(this));
this.data = {
description: decodeURI(path) + "#no-index #crumbs",
@oampo
oampo / index.js
Created August 19, 2015 10:21
ISS Finder M1
var axios = require('axios');
var findPassTime = function(latitude, longitude) {
return axios.get('http://api.open-notify.org/iss-pass.json', {
params: {
lat: latitude,
lon: longitude
}
})
@oampo
oampo / WebKitBufferPlayer.js
Created January 12, 2012 10:49
Web Audio API Buffer Playback for Audiolet
var WebKitBufferPlayer = function(audiolet, url) {
AudioletNode.call(this, audiolet, 0, 1);
this.isWebKit = this.audiolet.device.sink instanceof Sink.sinks.webkit;
this.context = this.audiolet.device.sink._context;
if (this.isWebKit) {
this.xhr = new XMLHttpRequest();
this.xhr.open("GET", url, true);
this.xhr.responseType = "arraybuffer";
@oampo
oampo / gist:1639302
Created January 19, 2012 10:30
XHR for WebGL file export
var data = this.canvas.toDataURL();
var request = new Request({
url: 'http://127.0.0.1:8080',
onFailure: function(xhr) {
console.error(xhr);
}
});
url = request.send('data=' + data + '&frame=' + this.frameCount);
@oampo
oampo / __hooks__.py
Created January 16, 2013 12:13
Template globals in Wok
from template_globals import template_globals
hooks = {
"page.template.pre" : [template_globals]
}
@oampo
oampo / Makefile
Last active December 26, 2015 04:49
STM32F4 Blinkenlights
# Useful locations
MBED = ../../mbed/build/mbed
# MCU
MANUFACTURER=STM
FAMILY=STM32F4XX
MCU=STM32F407
# Files
SRC = $(wildcard *.cc)