Skip to content

Instantly share code, notes, and snippets.

#
# Cookbook Name:: cassandra
# Recipe:: default
#
package "openjdk-6-jre" do
action :install
end
directory "#{node[:basedir]}" do
[11:11:03][Dropbox Connector] { stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'socket hang up' }
[11:11:03][Dropbox Connector][ERROR]
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
@quartzjer
quartzjer / gist:1068160
Created July 6, 2011 19:43
mysterious osx crash
Process: Software Update [1723]
Path: /System/Library/CoreServices/Software Update.app/Contents/MacOS/Software Update
Identifier: com.apple.SoftwareUpdate
Version: 4.0.6 (270)
Build Info: SoftwareUpdate-2700000~1
Code Type: X86-64 (Native)
Parent Process: launchd [98]
Date/Time: 2011-07-06 14:40:43.786 -0500
OS Version: Mac OS X 10.6.6 (10J567)
@quartzjer
quartzjer / gist:1068181
Created July 6, 2011 19:53
dtruss of mac app crash
bash-3.2# pwd
/System/Library/CoreServices/Software Update.app/Contents/MacOS
bash-3.2# dtruss "./Software\ Update"
SYSCALL(args) = return
getpid(0x7FFF5FBFF900, 0x7FFFFFE00050, 0x0) = 2078 0
open_nocancel("/dev/urandom\0", 0x0, 0x0) = 3 0
read_nocancel(0x3, "\3720Xxs\026\267i\026\364\213QM\b#%\334\324L\221\022_\247E\312\253\212\310\212\345\221I\034\0", 0x6C) = 108 0
close_nocancel(0x3) = 0 0
open_nocancel(".\0", 0x0, 0x0) = 3 0
fstat64(0x3, 0x7FFF5FBFD650, 0x0) = 0 0
jer@six:~$ cat taily.sh
#!/bin/sh
cd Locker
git pull origin master > /dev/null
UAPP=`find . -exec grep -l "status...unstable" {} \; | xargs -L 1 basename | grep "\.app" | wc -l`
UCONN=`find . -exec grep -l "status...unstable" {} \; | xargs -L 1 basename | grep "\.connector" | wc -l`
SAPP=`find . -exec grep -l "status...stable" {} \; | xargs -L 1 basename | grep "\.app" | wc -l`
SCONN=`find . -exec grep -l "status...stable" {} \; | xargs -L 1 basename | grep "\.connector" | wc -l`
echo "{\"uapp\":\"$UAPP\",\"uconn\":\"$UCONN\",\"sapp\":\"$SAPP\",\"sconn\":\"$SCONN\"}"
jer@six:~$ crontab -l | grep taily
{"level":"info","message":"Synclet contacts starting for gcontacts"}
{"level":"error","message":"401, baaaaby!\n"}
{"level":"error","message":"refreshing token -- statusCode !== 200, yoikes! data: <HTML>\n<HEAD>\n<TITLE>Client must specify either client_id
and client_secret or client_assertion, not both</TITLE>\n</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n<H1>Client must specify either
client_id and client_secret or client_assertion, not both</H1>\n<H2>Error 400</H2>\n</BODY>\n</HTML>\n\nerr <HTML>\n<HEAD>\n<TITLE>Client must
specify either client_id and client_secret or client_assertion, not both</TITLE>\n</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n<H1>C
lient must specify either client_id and client_secret or client_assertion, not both</H1>\n<H2>Error 400</H2>\n</BODY>\n</HTML>\n\nresult undef
ined\n"}
root@ip-10-124-141-161:/var/lxc-machines/storage# more locker_jer_21/Me/gcontacts/me.json
{
"title": "Google Contacts Account",
"status": "waiting",
"provides": [
"contact/gcontacts"
],
"provider": "gcontacts",
"synclets": [
{
Current State:
• /query
• /synclets/<syncletname>/getCurrent/<type>
• /Me/links
◦ /state
◦ /ready (redundant to /state)
◦ /since
◦ /search
◦ /getLinksFull (non-REST naming)
◦ /getLinks (non-REST naming)
@quartzjer
quartzjer / gist:1402338
Created November 28, 2011 22:16
lupdate.js
var req = require("request");
var async = require("async");
var cols = ["photos", "places", "contacts", "links"];
var c = {};
async.forEachSeries(cols, function(col, cb){
req.get({uri:"http://localhost:8042/Me/"+col+"/state", json:true}, function(e,r,js){
c[col] = js.count;
cb();
});
02:03:33 22377 6623 4.28 5.52 7.51 6.84
02:13:33 22621 6761 4.18 2.79 4.70 5.77
02:23:33 22322 6759 4.75 3.36 3.71 5.01
02:33:33 22826 6971 4.21 3.85 3.27 4.08
02:43:33 22738 7008 4.29 1.68 3.36 3.94
02:53:33 22622 6763 4.28 2.50 3.37 3.72
03:03:33 22080 6610 4.19 1.80 3.97 4.16
03:13:33 21283 6297 4.25 3.09 3.35 3.67
03:23:33 21802 6536 4.69 4.50 3.65 3.72
03:33:33 21953 6720 4.26 2.58 2.88 3.27