Skip to content

Instantly share code, notes, and snippets.

View jaytaph's full-sized avatar
:shipit:
Calculating pi

Joshua Thijssen jaytaph

:shipit:
Calculating pi
View GitHub Profile
namespace eval moin {
bind pubm -|- * moin::moin
}
proc moin::moin { nick host handle chan text } {
if {[regexp -nocase -- {(^moin|^mornin)} $text]} {
putserv "PRIVMSG $chan :$nick moin"
}
if {[regexp -nocase -- {(^:\)|^:P)} $text]} {
@jaytaph
jaytaph / shiftin.php
Created February 11, 2013 14:26 — forked from Dynom/shiftin.php
<?php
/**
* @author Mark van der Velden <mark@dynom.nl>
*/
/*
* Given, the following specification:
* - part 1, 40 bits wide -- a number between 0 - 1099511627775
* - part 2, 5 bits wide -- a number between 0 - 31
* - part 3, 9 bits wide -- a number between 0 - 511
@jaytaph
jaytaph / saffire.sf
Last active December 10, 2015 05:38 — forked from anonymous/gist:4389353
class saffire {
// Returns saffire version (should be tuple major.minor.build)
public method version();
// Returns the git revision which was used for building this saffire version
public method git_revision();
// Returns the current run_mode: "fastcgi", "repl", "cli"
public method run_mode();
@jaytaph
jaytaph / twitter.tcl
Last active December 9, 2015 22:08 — forked from anonymous/twitter.tcl
package require http
namespace eval twitter {
variable status_url "http://api.twitter.com/1/statuses/user_timeline/"
bind pub -|- "!twitter" twitter::tweet
}
proc twitter::tweet {nick uhost hand chan argv} {
if {[string length $argv] < 1} {
namespace eval moin {
bind pubm -|- * moin::moin
}
proc moin::moin { nick host handle chan text } {
if {[regexp -nocase -- {(^moin|^mornin)} $text]} {
putserv "PRIVMSG $chan :$nick moin"
}
}