Skip to content

Instantly share code, notes, and snippets.

View linuxsable's full-sized avatar

Tyler Van Hoomissen linuxsable

View GitHub Profile
#!/usr/bin/env ruby
#
# Author: @_ty
# Made with <3
#
class Breaky
VERSION = '0.1'
MSG_INTERVAL = 1 #1 hour
SLEEP_INTERVAL = 3
MSG = 'Take a walk break.'
// Use for timing tests
function Timer() {
this.startTime = 0;
this.endTime = 0;
this.elapsed = 0;
this.start = function() {
this.startTime = Date.now();
return this;
};
/*
* Author: @_ty
* Tested with: 1.6.4.
*
* jQuery plugin for css fades.
* It's usage is identical to jQuerys fadeIn, fadeOut & fadeToggle,
* except you must pass in a number in ms for the duration.
*
* Currently this plugin assumes that you can handle
* CSS3 (no detection support yet).
ERROR: Error installing viking-bloopsaphone:
ERROR: Failed to build gem native extension.
/Users/linuxsable/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for main() in -lportaudio... yes
checking for main() in -lsndfile... no
creating Makefile
make
compiling bloopsaphone.c
import sys
import time
from math import sqrt
def smallest(num):
start_time = time.time()
num = int(num)
iterations = 1
rooted = sqrt(float(num))
puts "Hello World"
@linuxsable
linuxsable / gist:2473640
Created April 23, 2012 20:30
Addition by subtraction.
def add(x, y)
if x <= 0
y
else
add(x -= 1, y += 1)
end
end
print add(12, 15)
import sys
import time
from math import sqrt
def smallest2(num):
start_time = time.time()
num = int(num)
f = factors(num)
medians = median(f)
$("<img />").bind("load", function() {
$self
.hide()
.attr("src", $self.data(settings.data_attribute))[settings.effect](settings.effect_speed);
2012-05-17 23:36:11.884 MT16[8650:13e07] (
{
contributors = "<null>";
coordinates = "<null>";
"created_at" = "Mon Jun 29 04:45:36 +0000 2009";
entities = {
hashtags = (
);
urls = (
);