Skip to content

Instantly share code, notes, and snippets.

View atduskgreg's full-sized avatar

Greg Borenstein atduskgreg

View GitHub Profile
include("/Users/greg/code/textual/jquery-1.2.6.js")
Electron.Feeds = function() {
Neutron.addMenu('Feeds', Neutron.menuCount() - 2);
Neutron.addMenuItem('Feeds', 'Atomicity Blog', function() {
url = "http://feeds.dailykos.com/dailykos/index.xml"
$.getJSON("http://ejohn.org/apps/rss2json/?url=" + encodeURIComponent(url) + "&t="+(new Date()).getTime()+ "&callback=?", function(data){
window.currentBuffer.text(data.content);
return false;
})
[211/1000] downloading 0196fe1fc8785fac8020c3ebb9a44fb6.mp3
[212/1000] downloading 0197071200364a56ea82490e98a2b6ee.mp3
[213/1000] downloading 019820a93f569606ec395ca8be945ef5.mp3
[214/1000] downloading 0198640beab612b705a4f05afdc64a7b.mp3
ruby(3750,0xa0522fa0) malloc: *** mmap(size=7581696) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
ruby(3750,0xa0522fa0) malloc: *** mmap(size=7581696) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
#git aliases
alias gst='git status'
alias gl='git pull'
alias gp='git push'
alias gd='git diff | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
@atduskgreg
atduskgreg / gist:44089
Created January 7, 2009 00:26
patched version of jquery tinydb plugin that does appends
/* jquery.tinydb - jQuery interface to TinyDB (http://tinydb.org/)
* Copyright (c) 2008 Chris Moyer (chris@inarow.net)
*
* usage:
* jQuery.tinydb.read(tinydb_id, callback);
* callback is called with the data from TinyDB
*
* jQuery.tinydb.write({key: val, key2: val2}, callback);
* write data, callback is called with tinydb_id string
*
echo "editing "`gem which $1 | tail -n 1 | awk -F/ 'BEGIN { OFS="/" } {print $1, $2, $3, $4, $5, $6, $7, $8, $9}'`
mate `gem which $1 | tail -n 1 | awk -F/ 'BEGIN { OFS="/" } {print $1, $2, $3, $4, $5, $6, $7, $8, $9}'`
# INSTRUCTIONS:
# - start thusly: ruby meebo_api_demo.rb -e production
# DEPENDENCIES:
# sudo gem install do_mysql dm-core
# sudo gem install sinatra
# sudo gem install launchy
# sudo gem install json
# suod gem install hoe
---
:update_sources: true
:bulk_threshold: 1000
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
- http://gems.github.com
gem: --no-ri --no-rdoc
:verbose: true
:benchmark: false
greg@gabc:~/code/sofa (master) $couchapp push http://127.0.0.1:5984/sofa-hello
Pushing CouchApp in /Users/greg/code/sofa to http://127.0.0.1:5984/sofa-hello/_design/sofa
Traceback (most recent call last):
File "/usr/local/bin/couchapp", line 8, in <module>
load_entry_point('Couchapp==0.1.7', 'console_scripts', 'couchapp')()
File "/Library/Python/2.5/site-packages/Couchapp-0.1.7-py2.5.egg/couchapp/bin/couchapp_cli.py", line 99, in main
push(appdir, appname, dbstring)
File "/Library/Python/2.5/site-packages/Couchapp-0.1.7-py2.5.egg/couchapp/bin/couchapp_cli.py", line 42, in push
fm.push_app(appdir, appname,verbose=True)
File "/Library/Python/2.5/site-packages/Couchapp-0.1.7-py2.5.egg/couchapp/file_manager.py", line 195, in push_app
# from http://www.pixelbeat.org/settings/.inputrc
# By default up/down are bound to previous-history
# and next-history respectively. The following does the
# same but gives the extra functionality where if you
# type any text (or more accurately, if there is any text
# between the start of the line and the cursor),
# the subset of the history starting with that text
# is searched (like 4dos for e.g.).
class Arkx < ArduinoSketch
input_pin 1, :as => :knob
serial_begin
def loop
if serial_available
serial_println analogRead( knob )
serial_read # flush the bit
end
end