Skip to content

Instantly share code, notes, and snippets.

View mattparlane's full-sized avatar

Matt Parlane mattparlane

View GitHub Profile
Oct 7 10:13:46 nz1 wg-ruby: NoMethodError - undefined method `unpack' for nil:NilClass:
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/connection.rb:88:in `read'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/connection.rb:169:in `with_connection'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/connection.rb:86:in `read'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/protocol/query.rb:140:in `receive_replies'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/connection.rb:125:in `receive_replies'
Oct 7 10:13:46 nz1 wg-ruby: #011org/jruby/RubyArray.java:2347:in `collect'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/connection.rb:124:in `receive_replies'
Oct 7 10:13:46 nz1 wg-ruby: #011/home/wg/.rvm/gems/jruby-1.6.8/gems/moped-1.2.5/lib/moped/node.rb:
wg@wgdev:~/topaz$ ~/pypy/rpython/bin/rpython -Ojit targettopaz.py
[translation:info] 2.7.3 (140cb204a130, Jul 02 2013, 22:00:22)
[translation:info] [PyPy 2.1.0-alpha0 with GCC 4.6.3]
[platform:msg] Set platform with 'host' cc=None, using cc='gcc'
[translation:info] Translating target as defined by targettopaz
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-default-1/gcctest.c -o /tmp/usession-default-1/gcctest.o
[platform:execute] gcc /tmp/usession-default-1/gcctest.o -pthread -lrt -o /tmp/usession-default-1/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-default-1/gcctest.c -o /tmp/usession-default-1/gcctest.o
[platform:execute] gcc /tmp/usession-default-1/gcctest.o -pthread -lrt -o /tmp/usession-default-1/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-default-1/platcheck_0.c -o /tmp/usession-default-1/platcheck_0.o
@mattparlane
mattparlane / gist:9756121
Created March 25, 2014 06:19
done() handler not firing for DELETE request when Content-Type header is set
require 'sinatra'
get '/' do
'
<script src=//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js></script>
<script>
$(function() {
$("a").click(function() {
var url = $(this).data("url");
$.ajax({
@mattparlane
mattparlane / gist:9756123
Created March 25, 2014 06:20
done() handler not firing for DELETE request when Content-Type header is set
require 'sinatra'
get '/' do
'
<script src=//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js></script>
<script>
$(function() {
$("a").click(function() {
var url = $(this).data("url");
$.ajax({
@mattparlane
mattparlane / gist:9824481
Created March 28, 2014 03:11
gulpfile.js
var gulp = require('gulp'),
gutil = require('gulp-util'),
coffee = require('gulp-coffee'),
yaml = require('./js/gulp/regen-yaml.js');
var paths = {
coffee: ['coffee/**/*.coffee', 'coffee/**/*.litcoffee'],
yaml: ['structure.yaml', 'language-strings.yaml'],
};
wg@wgdev:~$ ~/mongodb/bin/mongorestore -j 1 --drop dump/
2014-11-28T15:34:54.511+1300 building a list of dbs and collections to restore from dump/ dir
2014-11-28T15:34:54.528+1300 reading metadata file from dump/wg/files.metadata.json
2014-11-28T15:34:54.583+1300 restoring wg.files from file dump/wg/files.bson
2014-11-28T15:34:57.528+1300 [........................] wg.files 185998257/6710800085 (2.8%)
2014-11-28T15:35:00.527+1300 [#.......................] wg.files 334784905/6710800085 (5.0%)
2014-11-28T15:35:03.527+1300 [#.......................] wg.files 468518525/6710800085 (7.0%)
2014-11-28T15:35:06.528+1300 [##......................] wg.files 600753676/6710800085 (9.0%)
2014-11-28T15:35:09.528+1300 [##......................] wg.files 734770087/6710800085 (10.9%)
2014-11-28T15:35:12.528+1300 [###.....................] wg.files 868171415/6710800085 (12.9%)
@mattparlane
mattparlane / gist:a8c39260f034eedec820
Last active August 29, 2015 14:16
MongoDB/WiredTiger - compress all collections in a database.
colls = db.getCollectionNames();
for (var i = 0; i < colls.length; i++) {
var coll = colls[i];
if (coll.match(/^system/)) continue;
if (coll.match(/_old$/) || coll.match(/_comp$/)) {
db[coll].drop();
continue;
}
<?xml version="1.0" ?>
<verbosegc xmlns="http://www.ibm.com/j9/verbosegc" version="Preview">
<exclusive-start id="1" timestamp="2015-12-17T02:16:21.389" intervalms="42.208">
<response-info timems="0.000" idlems="0.000" threads="0" lastid="0000000000000000" lastname="OMR_VMThread [" />
</exclusive-start>
<af-start id="2" threadId="00007F2F3137CFD0" totalBytesRequested="40" timestamp="2015-12-17T02:16:21.389" intervalms="42.392" />
<cycle-start id="3" type="global" contextid="0" timestamp="2015-12-17T02:16:21.389" intervalms="42.510" />
<gc-start id="4" type="global" contextid="3" timestamp="2015-12-17T02:16:21.389">
<html>
<head>
<title>Copy Of Confirmation</title>
<style>.tplMain{background-color:#4E8ABE;clear:both;border-color:#4E8ABE;border-style:solid;border-width:6px 6px 6px 6px;margin-left:auto;margin-right:auto;empty-cells:show;}
.tplLeftPanel{border-width:6px 6px 6px 6px;border-style:solid;padding:0px 0px 0px 0px;background-color:#4E8ABE;border-color:#4E8ABE;}
body{margin:12px 12px 12px 12px;background-color:#FFFFFF;}
a, td a{color:#0000CC;}
a:hover,a:visited:hover,td a:hover,td a:visited:hover{color:#0000CC;}
a:visited, td a:visited{color:#551A8B;}
require 'inline-style'
html = File.read('test.html')
loop do
InlineStyle.process(html)
end