Skip to content

Instantly share code, notes, and snippets.

View mick's full-sized avatar

Mick Thompson mick

View GitHub Profile
@mick
mick / gist:245898
Created November 30, 2009 23:56
loops the hadoop fs shell command to make it interactive
#!/bin/bash
# starts an interactive shell to the hadoop file system.
# Written by David M. Thompson, 2009
CMD="hadoop fs -"
echo
while [ 1 ]
do
echo -n "hdfs> "
read ANSWER
Collecta.com
_____________
/ / _____ \
/ / / \ \ \
/ / / \_\__\
| | | Collecta. New things Now.
| | | _ ___
\ \ \ / / /
<item id='1'><entry xmlns='http://www.w3.org/2005/Atom'><id>tag:myspace.com,2009:/activity/432665526/StatusMoodUpdate/315928539/315928539</id><author><name>benrobertsabq</name><uri>http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&amp;friendid=432665526</uri><icon>http://c3.ac-images.myspacecdn.com/images02/41/s_7d424e9c3bb347dbba83c11cb2925696.jpg</icon></author><published>2010-01-04T21:55:39Z</published><updated>2010-01-04T21:55:39Z</updated><link href='http://x.myspacecdn.com/modules/common/static/img/statusmoood.gif' type='image/gif' rel='icon'/><link href='http://friends.myspace.com/index.cfm?fuseaction=profile.friendmoods&amp;friendId=432665526' type='text/html' rel='alternate'/>
<content type='html'> benrobertsabq Test qwerty123 blah</content>
<title type='text'>benrobertsabq Test qwerty123 blah</title><category xmlns='http://api.collecta.com/ns/search-0#results'>update</category><site xmlns='http://api.collecta.com/ns/search-0#results'>/index.cfm</site><timesaved xmlns='http://api.c
(defvar user-temporary-file-directory
(concat temporary-file-directory user-login-name "/"))
(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
(setq backup-directory-alist
`(("." . ,user-temporary-file-directory)
(,tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
(concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="10" yahoo:created="2010-04-22T10:26:23Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>false</publiclyCallable>
<url execution-time="461"><![CDATA[http://social.yahooapis.com/yosapt_mt_feeder-1.0.0/v1/search/?offset=0&hits=10]]></url>
<user-time>463</user-time>
<service-time>461</service-time>
<build-version>6242</build-version>
</diagnostics>
<results>
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="50" yahoo:created="2010-04-22T10:52:25Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>false</publiclyCallable>
<url execution-time="739"><![CDATA[http://social.yahooapis.com/yosapt_mt_feeder-1.0.0/v1/search/?offset=0&hits=50]]></url>
<user-time>742</user-time>
<service-time>739</service-time>
<build-version>6242</build-version>
</diagnostics>
<results>
=ERROR REPORT==== 2010-07-06 20:16:33 ===
ERROR: "E(~p:~p:~p) : Bad RPC error to ~p: ~p~nrunning chain link: ~p~n" - [<0.360.0>,
chaincollecta_hook,
100,
ejabberd@localhost,
chain_urlexpand,
add_expanded_urls,
{'EXIT',
{function_clause,
=INFO REPORT==== 2010-07-07 09:07:13 ===
ERROR: "I(~p:~p:~p) : The payload~n" - [<0.378.0>,
chain_urlexpand,
82,
{xmlelement,
"entry",
[{"xmlns",
"http://www.w3.org/2005/Atom"}],
[{xmlelement,
"source",
@mick
mick / gist:752306
Created December 22, 2010 23:42
Proxy CouchDB queries in Node
function recent(req, res, page){
var skip = page * 10;
db.view("recent", "recent", {"limit": 10, "skip":skip, "descending": "true"}, function(er, docs) {
if (er) {
new Error('Failed to load user ' + sys.inspect(er));
}
else{
res.send(docs);
}
@mick
mick / gist:752322
Created December 22, 2010 23:54
siege results
Transactions: 5000 hits
Availability: 100.00 %
Elapsed time: 184.75 secs
Data transferred: 41.63 MB
Response time: 1.27 secs
Transaction rate: 27.06 trans/sec
Throughput: 0.23 MB/sec
Concurrency: 34.44
Successful transactions: 5000
Failed transactions: 0