Skip to content

Instantly share code, notes, and snippets.

View TBD's full-sized avatar
💭
working

TBD TBD

💭
working
View GitHub Profile
@TBD
TBD / fetch_test.rb
Created October 19, 2011 18:18
FetchApp error
require 'rubygems'
require 'fetchapi-ruby'
# custom info sanitized
FetchAPI::Base.basic_auth('*URL*', '*key*', '*token*')
orders = FetchAPI::Order.find(:all)
orders.each do |order|
p order.downloads
end
@TBD
TBD / test.coffee
Created October 31, 2011 22:55
ducksboard
_data = '{"timestamp": 1320099130, "value": {"title": "msg", "content": "hello world"}}'
msg.http('https://push.ducksboard.com/')
.path('/values/10651/')
.auth(_apikey,"ignored")
.post(_data) (err, res, body) ->
msg.send body || 'unable to post'
@TBD
TBD / server.rb
Created December 16, 2011 01:47
omniauth using google openid
# 502 errors on CloudFoundry due use of Rack::Session::Cookie (and sessions enabled)
require 'rubygems'
require 'sinatra'
require 'omniauth'
require 'omniauth-openid'
require 'openid/store/filesystem'
enable :sessions
@TBD
TBD / sublime.txt
Created January 7, 2012 19:58
run Sublime unde GDB
> gdb "/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2"
gdb$ r
: to exit
gdb$ q
@TBD
TBD / makeLink.js
Created February 24, 2012 12:06
Crude javascript create link
@TBD
TBD / inject.js
Created March 11, 2012 19:11
browsing tools dotjs snippets
// --- requirement:
// --- dotjs - http://defunkt.io/dotjs/
// --- forrst.com
// --- click for next page
$("#content").click(function(){
var href = $('.pagination a').attr('href');
if (href && href != document.location)
document.location = href;
@TBD
TBD / index.html
Created June 6, 2012 18:07
Prezi Compo entry - 662 bytes
<style>body{overflow:hidden}z{display:none}w{position:absolute;top:50%;margin:0 auto;width:100%;text-align:center}</style><z><x>hello world</x><x>simple presentation tool</x><x>one feature:</x><x>zoom</x><x>by TBD/plugins.ro</x></z><w id='s'></u><script>b=1;c=0;d=8;e=document.getElementsByTagName("x");l="fffeeebbbaaa888444222000";function r(){if(b>d)c+=1,b=1;else if(b<0)c-=1,b=d;if(b<d)s.innerHTML=e[c].innerHTML;x=s.style;x.MozTransform=x['-webkit-transform']="scale("+b+")";x['color']='#'+l.substr(3*b,3)}t=function(e){m=e.wheelDeltaY||-e.detail;g=m&&m/Math.abs(m);b+=0.3*g;r()};q=window.addEventListener;q('mousewheel',t,0);q('DOMMouseScroll',t,0)</script>
@TBD
TBD / output.txt
Created December 13, 2012 22:02
roots 0.0.9 fails on deploy
~/Desktop ❯❯❯ roots new test
new project created at /test
~/Desktop ❯❯❯ cd test
~/D/test git:master ❯❯❯ roots compile ◼
compiling project...
minifying & compressing...
~/D/test git:master ❯❯❯ roots deploy test ◼
compiling project... done!
Chrome 23.0.1271.97, OSX 10.8.2
Uncaught SyntaxError: Unexpected token , 53261709:492
Uncaught ReferenceError: vimeo is not defined global_combined.min.js:599
Objective-C stub for message `cameraWithLatitude:longitude:zoom:' type `@@:ddf' not precompiled. Make sure you properly link with the framework or library that defines this message.