Skip to content

Instantly share code, notes, and snippets.

View rlemon's full-sized avatar
🍋
Hanging around.

Robert Lemon rlemon

🍋
Hanging around.
  • Dryer Moisture Systems Inc.
  • Kitchener, Ontario. Canada.
View GitHub Profile
@rlemon
rlemon / fib.js
Created May 27, 2014 02:15
fib.js
var fib = {
seq: [0, 1],
calc: function (n) {
var i = this.seq.length;
while (i < n) {
this.seq[i] = this.seq[i - 1] + this.seq[i++-2];
}
return this.seq.slice(0,n);
}
};
@rlemon
rlemon / unstar.user.js
Last active August 29, 2015 14:01
easy unstar
// ==UserScript==
// @name Easy unstar
// @author Robert Lemon
// @version 0.42
// @namespace
// @description adds a button next to the message to unstar them
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
function exec(fn) {
TITLE QTY DURATION PRICE SUB TOTAL
Domain Registration canvas.institute
[FAILED]
1
1 year
$16.88
$16.88
ICANN Fee $0.18
@rlemon
rlemon / spoken.user.js
Last active August 29, 2015 14:02
spoken chat
// ==UserScript==
// @name Spoken Chat
// @author Robert Lemon
// @version 0.42
// @namespace
// @description Speaks the chat.
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
io.on('alarm', function (data) {
var elms = $(data.selector),
parent = elms.parents('.l-box'),
other = parent.find('span:not(' + data.selector + ')');
if( !other.hasClass('alarm-warning') && !other.hasClass('alarm-warning') && data._value !== 0 ) {
elms = elms.add(parent.find('h3'));
}
if (data._value === 1) {
elms.addClass('alarm-warning');
canVibrate && (navigator.vibrate(1000));
@rlemon
rlemon / 11111
Last active August 29, 2015 14:02
boot-test runs in init.d
both work if I call them manually,
`/etc/init.d/boot-test start` and `sh ~/boot.sh`
but it is not rebooting on boot. Is there something jumping out that i'm missing?
@rlemon
rlemon / miaou.clouds.js
Created June 13, 2014 14:03
ugly code, hacked to demo for dystroy
(function() {
// setting it up so you can view it
document.documentElement.style.height = '100%';
left.style.background = 'Transparent';
right.style.background = 'Transparent';
document.body.style.background = 'linear-gradient(to bottom, #2d91c2 0%,#1e528e 100%)';
}())
Math.Tau = Math.PI * 2;
// utils
// these need to be changed in the CSS
document.documentElement.style.height = '100%';
document.body.style.height = '100%';
left.style.background = 'Transparent';
right.style.background = 'Transparent';
document.body.style.background = 'linear-gradient(rgb(245, 245, 245) 0%, rgb(30, 144, 255) 100%)';
// include for the clouds!
(function CloudManager(container, options) {
if (!('Tau' in Math)) {
io = io.connect(serverAddress);
io.emit('foo', { data: 123 });
io.emit('bar', { data: 456 });
// ^ this is what I want to be able to do from serverB
body {
background-color : #000 !important;
background-image : url("http://raw.github.com/oliversalzburg/se-chat-dark-theme/master/img/skewed_print.png") !important;
color : #ddd !important;
}
.messages {
background-color : #222 !important;
border : none !important;
color : #ddd !important;