Skip to content

Instantly share code, notes, and snippets.

View tekkub's full-sized avatar

Tekkub tekkub

View GitHub Profile
#!/usr/bin/env bash
let MIN=$1*60
echo "Timer scheduled for $1 minutes"
nohup bash -c "sleep $MIN && growlnotify -m '$2' -t 'Timer expired' -p 2 -s -n 'Terminal Timer' && afplay ~/Library/Sounds/weee.mp3 &"
local f = GetInventoryCount
local memo = setmetatable({}, {
__index = function(t,i)
-- Get the value and stash it for later
local v = f(i)
t[i] = v
return v
end
})
@tekkub
tekkub / gist:458212
Created June 30, 2010 03:37
RunNever.wtf
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to number of items in added_items
set this_item to item i of added_items
set the item_info to the info for this_item
if (the name of the item_info is "RunOnce.wtf") then
tell application "Finder"
delete this_item
end tell
end if
CHAT_FRAME_TAB_NORMAL_NOMOUSE_ALPHA = 0
CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA = 0
for i=1,NUM_CHAT_WINDOWS do
local tab = _G["ChatFrame"..i.."Tab"]
tab.noMouseAlpha = 0
tab:SetAlpha(0)
end
tekkub@iSenberg ~/tmp ❯ mkdir mergefun
tekkub@iSenberg ~/tmp ❯ cd mergefun/
tekkub@iSenberg ~/tmp/mergefun ❯ git init
Initialized empty Git repository in /Users/tekkub/tmp/mergefun/.git/
tekkub@iSenberg ~/tmp/mergefun master# ❯ echo "This is a test" > a.txt
tekkub@iSenberg ~/tmp/mergefun master# ❯ git add a.txt
tekkub@iSenberg ~/tmp/mergefun master# ❯ git commit -m "it's a start"
[master (root-commit) 788ddd4] it's a start
1 files changed, 1 insertions(+), 0 deletions(-)
local function getnote(fullname)
local _, online = BNGetNumFriends()
for i=1,online do
local _, givenName, surname, _, _, _, _, _, _, _, _, note = BNGetFriendInfo(i)
if (givenName.. " ".. surname) == fullname and note and note ~= "" then return note end
end
return name:gsub(" %w+$", "")
end
local function bettername(self, event, msg, name, ...)
print(event, msg, name, ...)
Scott pj doesn't know what he wants
PJ i do, too
Scott he wants one thing, i build it, then he wants another thing...
Scott next thing you know, it's 7am and we're eating eggs
PJ shutup scott
1 Author: Tom Preston-Werner <[email protected]>
2 Author: Kyle Neath <[email protected]>
3 Author: Scott Chacon <[email protected]>
3 Author: tekkub <[email protected]>
4 Author: Ryan Tomayko <[email protected]>
9 Author: Chris Wanstrath <[email protected]>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("#clickme").click(function() {
$("#clickme").after("<script src='http:\/\/gist.github.com\/431162.js'><\/script>")
$("#clickme").hide()
return false
})
@tekkub
tekkub / icalendar.rb
Created June 8, 2010 05:46 — forked from dcparker/icalendar.rb
GCal ruby lib
require 'net/http'
require 'uri'
require 'time'
class Time
def self.gcalschema(tzid) # We may not be handling Time Zones in the best way...
tzid =~ /(\d\d\d\d)(\d\d)(\d\d)T(\d\d)(\d\d)(\d\d)Z/ ? # yyyymmddThhmmss
# Strange, sometimes it's 4 hours ahead, sometimes 4 hours behind. Need to figure out the timezone piece of ical.
# Time.xmlschema("#{$1}-#{$2}-#{$3}T#{$4}:#{$5}:#{$6}") - 4*60*60 :
Time.xmlschema("#{$1}-#{$2}-#{$3}T#{$4}:#{$5}:#{$6}") :