Skip to content

Instantly share code, notes, and snippets.

View Neppord's full-sized avatar

Samuel Ytterbrink Neppord

View GitHub Profile
@Neppord
Neppord / RAINBOWlog.js
Last active August 29, 2015 13:57 — forked from zikes/RAINBOWlog.js
(function(){
var log = console.log;
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;';
function gen_css(){
return css + "font-size: " + (9 + ((Math.random() * 20) << 0)) + "px;"
}
console.log = function(str) {
var args = Array.prototype.slice.call(arguments);
@Neppord
Neppord / alarm.py
Created September 14, 2012 15:55 — forked from objarni/alarm.py
fuse variation
import random
class Sensor(object):
OFFSET = 16
def pop_next_pressure_psi_value(self):
pressure_telemetry_value = self.sample_pressure()
return Sensor.OFFSET + pressure_telemetry_value
def __iter__(self):
var FooClass = function()
{
x = function() { /* Class constructor */ };
x.prototype.foo = "bar";
x.prototype.__init__ = function()
{
this.something = "other";
};
x.prototype.__call__ = function() {
return 42;