Skip to content

Instantly share code, notes, and snippets.

Christian Howe coderarity

Block or report user

Report or block coderarity

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View foo.js
// (c) 2013 coderarity is a boss, inc
function Foo (id) {
var _this = this;
if (id) {
db.redis.get(id, function(err, res) {
var obj = JSON.parse(res);
for (property in obj) {
if (property === 'date_created') {
_this[property] = new Date(obj[property]);
} else {
coderarity / gist:5085896
Created Mar 4, 2013
this is a messy way to find a git file from the depths of git! change the grep to be some way to identify your file
View gist:5085896
git prune -n > tmp12312661.txt
sed -i 's/ blob//g' tmp12312661.txt
while read line
git cat-file -p $line | grep "require('simplesmtp')"
if [ "$?" == "0" ]; then echo $line; fi
done < tmp12312661.txt
rm tmp12312661.txt
coderarity / gist:4617985
Created Jan 24, 2013
what's wrong with this?
View gist:4617985
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#define ERROR_VAL -1
#define SUCCESS_VAL 0
#define ERROR (err) { errno = (err); }
View gist:4576240
var express = require('express'),
wine = require('./routes/wines');
var app = express();
app.configure(function () {
app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */
coderarity / gist:4425929
Created Jan 1, 2013
Awesome lack of Java on android! I am pleased.
View gist:4425929
// from
void android_main(struct android_app* state) {
// Make sure glue isn't stripped.
// loop waiting for stuff to do.
while (1) {
// Read all pending events.
int ident;
coderarity / gist:4409172
Created Dec 29, 2012
mtpfs crashes with Nexus 7 after trying to copy some books over
View gist:4409172
Dec 29 15:21:31 twilight sudo[1324]: coderarity : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/mtpfs -o allow_other /media/Nexus7/
Dec 29 15:21:31 twilight sudo[1324]: pam_unix(sudo:session): session opened for user root by coderarity(uid=0)
Dec 29 15:21:40 twilight sudo[1324]: pam_unix(sudo:session): session closed for user root
Dec 29 15:22:11 twilight kernel: mtpfs[1330]: segfault at 0 ip 0804c9b1 sp b68fefe0 error 4 in mtpfs[8048000+7000]
Dec 29 15:22:11 twilight systemd-coredump[1373]: Process 1328 (mtpfs) dumped core.
coderarity / gist:4394690
Created Dec 28, 2012
simple example of how to update Nodejitsu domains field without adding it to your package.json
View gist:4394690
var http = require('http')
var nj = require('nodejitsu-api')
var client = nj.createClient({
username: 'coderarity',
password: '*****',
remoteUri: ''
var appname = 'dns-test'
coderarity / gist:4361459
Created Dec 22, 2012
Tower of Heaven level - play at click load custom level
View gist:4361459
View curlPass
ofshard@whyink:~/346321 (master) $ curl -X POST \ -H "Content-type: application/json" \ --data "{ \"credentials\": githubUser:githubPassword }" \ https://nodejitsuUse
curl: (6) Couldn't resolve host ' -H'
View gist:4050384
"name": "nko3-intergrupo-mobile",
"version": "0.0.0-6",
"description": "Intergrupo Mobile",
"main": "server.js",
"scripts": {
"start": "node server.js"
"repository": {
"type": "git",
You can’t perform that action at this time.