Skip to content

Instantly share code, notes, and snippets.

View TBD's full-sized avatar
💭
working

TBD TBD

💭
working
View GitHub Profile
# quick hack to get the following accounts of two twitter accounts
require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter')
httpauth = Twitter::HTTPAuth.new('account_2_email', 'account_2_pass')
twitter = Twitter::Base.new(httpauth)
filter = proc {|f| f.screen_name }
friends_2 = twitter.friends.map(&filter)
@TBD
TBD / personal hub.txt
Created August 25, 2009 08:31
Personal Hub Ideas
Personal Hub Ideas (work in progress)
features:
* get RSS updates/twitter timeline/emails/notifications/search alerts/...
* remove duplicates/copy&paste articles
* server based - to be able to read from desktop/iphone
* easy to import/export data - apml
* quick glance - see quickly if it is worth reading now (tag cloud sorted by occurrence)
* postrank - highlight important items (see postrank.com) and discover new sources
input:
http://polimedia.us/trip/json.php?u=tbdr&c=myfunc
output:
myfunc([{"user" : "tbdr","position" : "786","score" : "0.17309","RT from" : "<font color=#0a00f5>PorscheTM</font>, <font color=#2f00d0>bleau</font>, <font color=#0900f6>whocoulddizbe</font>, <font color=#0700f8>Adeline</font>"}])
test app:
http://code.plugins.ro/trip.htm
it should display the correct user info, otherwise the step that fails is displayed
@TBD
TBD / jsdb.js
Created February 23, 2010 14:45
// --- functions required
function require(arg) {
var ret = load(arg+".js")
//print(ret + ": loading " + arg + "\n")
}
var module = ""
require("rewriter")
require("scope")
require("nodes")
@TBD
TBD / gist:827332
Created February 15, 2011 09:54
Debugging rbtrace under GoogleSketchup
> make
ld: warning: in ./libmsgpackc_ext.a, file was built for unsupported file format which is not the architecture being linked (i386)
> console log errors
dyld: lazy symbol binding failed: Symbol not found: _msgpack_unpack_next
Referenced from: /Users/tbd/Desktop/github/rbtrace/ext/rbtrace.bundle
Expected in: flat namespace
dyld: Symbol not found: _msgpack_unpack_next
Referenced from: /Users/tbd/Desktop/github/rbtrace/ext/rbtrace.bundle
Expected in: flat namespace
CREATE TABLE `phpbb_posts` (
`post_id` mediumint(8) unsigned NOT NULL auto_increment,
`topic_id` mediumint(8) unsigned NOT NULL default '0',
`forum_id` mediumint(8) unsigned NOT NULL default '0',
`poster_id` mediumint(8) unsigned NOT NULL default '0',
`icon_id` mediumint(8) unsigned NOT NULL default '0',
`poster_ip` varchar(40) collate utf8_bin NOT NULL default '',
`post_time` int(11) unsigned NOT NULL default '0',
`post_approved` tinyint(1) unsigned NOT NULL default '1',
`post_reported` tinyint(1) unsigned NOT NULL default '0',
@TBD
TBD / gist:950630
Created May 1, 2011 16:39
Macshairport
01/05/2011 19:37:56 MacShairport[608] -[MSShairportServer netServiceDidPublish:] [Line 90] Published: _raop._tcp.: 5000
01/05/2011 19:38:34 MacShairport[608] -[MSShairportServer connection:didReceiveData:] [Line 71] Raw request: OPTIONS * RTSP/1.0
CSeq: 0
Apple-Challenge: Q89dbjXGjQ7yGcbPzhWOpQ==
01/05/2011 19:38:34 MacShairport[608] -[MSShairportServer connection:didReceiveData:] [Line 75] Parsed request: {
"Apple-Challenge" = "Q89dbjXGjQ7yGcbPzhWOpQ==";
Body = "";
CSeq = 0;
Method = "OPTIONS * RTSP/1.0";
@TBD
TBD / flexiDROID.htm
Created May 3, 2011 23:02
JS1k winner by @KeenBlaze unpacked by @tbdr
<html>
<head>
<title>JS1k, 1k demo submission [984]</title>
<meta charset="utf-8">
</head>
<body marginwidth="0" marginheight="0">
<canvas id="c" width="1000" height="800"></canvas>
<script>
var b = document.body;
var c = document.getElementsByTagName('canvas')[0];
@TBD
TBD / gist:1028310
Created June 15, 2011 22:47
open Adium from Albert
steps:
1) open Apple Script Editor
2) paste and save:
on run argv
tell application "Adium"
activate
try
set usr to first contact whose display name contains (item 1 of argv)
set nme to name of usr
@TBD
TBD / gist:1042033
Created June 23, 2011 06:36
github.mac 2 errors
2 errors when I use Github.Mac
* press Clone in Mac and after cloning (i see the files in the dir) I get:
(
0 GitHub 0x00000001000755dc -[GHApplication presentError:] + 313
1 GitHub 0x0000000100018817 __62-[GHCachedStateManager cloneAndAddRepository:atURL:toFileURL:]_block_invoke_0292 + 66
2 libSystem.B.dylib 0x00007fff85bab284 _dispatch_call_block_and_release + 15
3 libSystem.B.dylib 0x00007fff85b89df2 _dispatch_queue_drain + 251
4 libSystem.B.dylib 0x00007fff85b8a69f _dispatch_queue_serial_drain_till_empty + 9
5 libSystem.B.dylib 0x00007fff85bbd43c _dispatch_main_queue_callback_4CF + 37