Skip to content

Instantly share code, notes, and snippets.

View jcrugzz's full-sized avatar

Jarrett Cruger jcrugzz

View GitHub Profile
@jcrugzz
jcrugzz / gist:3741446
Created September 18, 2012 05:34
smartos logs ipfilter
+ SMF_EXIT_MON_OFFLINE=98
+ SMF_EXIT_ERR_NOSMF=99
+ SMF_EXIT_ERR_PERM=100
+ . /lib/svc/share/ipf_include.sh
+ IPFILTER_FMRI=svc:/network/ipfilter:default
+ ETC_IPF_DIR=/etc/ipf
+ /usr/bin/svcprop -p config/ipf6_config_file svc:/network/ipfilter:default
+ 2> /dev/null
+ IP6FILCONF=/etc/ipf/ipf6.conf
+ [ 0 -eq 1 ]
@jcrugzz
jcrugzz / Websocket.java
Created September 20, 2012 06:06 — forked from max-mapper/Websocket.java
android websocket wss:// plugin (not done)
package com.phonegap.plugins.websocket;
import android.os.Bundle;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.apache.cordova.api.Plugin;
import org.apache.cordova.api.PluginResult;
import java.net.URI;
@jcrugzz
jcrugzz / QRHookActivity.java
Created September 20, 2012 06:32
Websocket workaround android
package com.qrhook.www;
/*import android.app.Activity;*/
import android.os.Bundle;
import org.apache.cordova.*;
import com.strumsoft.websocket.phonegap.WebSocketFactory;
public class QRHookActivity extends DroidGap {
@jcrugzz
jcrugzz / gist:3765361
Created September 22, 2012 06:31
Odd nodejitsu error
info: Welcome to Nodejitsu jcrugzz
info: jitsu v0.9.7
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in node server.js
info: Checking app availability WebRTC
info: Creating app WebRTC
info: Creating snapshot 0.0.0-6
info: Updating app WebRTC
info: Activating snapshot 0.0.0-6 for WebRTC
@jcrugzz
jcrugzz / brewDoctor
Created September 26, 2012 04:02
Homebrew libgcrypt failed build Log and brew doctor output
libgcrypt ❯ brew doctor
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
pianobar
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
brew install libgcrypt
@jcrugzz
jcrugzz / 0-primeFactor.js
Created October 29, 2012 03:36 — forked from Marak/0-primeFactor.js
Experimenting with new process.prevTick() API
//
// Calculating prime factors in polynomial time using node.js process.prevTick()
//
// see: http://en.wikipedia.org/wiki/Prime_factor
// see: http://en.wikipedia.org/wiki/Novikov_self-consistency_principle
//
// Authors:
// http://jesusabdullah.net/
// http://marak.com
//
@jcrugzz
jcrugzz / browser.js
Created November 1, 2012 04:39
crdt ordering example
var doc = new(require('crdt').Doc);
var seq = doc.createSeq('type', 'rank');
doc.on('row_update', function (row) {
if (row.state.type !== 'rank') return;
var spans = document.querySelectorAll('.row span');
[].forEach.call(spans, function (span, ix) {
if (span.textContent === row.state.value) {
@jcrugzz
jcrugzz / gist:4050675
Created November 10, 2012 10:42
nko server err
An error has occurred: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
var hyperglue = require('hyperglue');
var html = require('./html/listElement');
module.exports = ChatList;
function ChatList (target) {
if(!(this instanceof ChatList)) return new ChatList(target);
this.target = target;
this.users = [];
@jcrugzz
jcrugzz / pkgcloud error output
Created February 1, 2013 04:06
pkgcloud test error when offline
♢ pkgcloud/rackspace/databases/users │
/Users/jcrugzz/node.js/nodejitsu/pkgcloud/node_modules/nock/lib/request_overrider.js:139 │
if (interceptors.length < 1) { throw new Error("Nock: No match for HTTP re │
^