Skip to content

Instantly share code, notes, and snippets.

View mhansen's full-sized avatar
🏠
Trying

Mark Hansen mhansen

🏠
Trying
View GitHub Profile
@mhansen
mhansen / post-update
Created January 28, 2010 00:51
post-update hook on my jekyll blog repo
#!/bin/sh
# there really should be an easier way to get files out of a git repo
mkdir /tmp/jekyll-blog 2> \dev\null
git --bare --git-dir=/home/Moon/jekyll-blog.git archive master | tar xC /tmp/jekyll-blog
#compile the site to html
/var/lib/gems/1.8/bin/jekyll /tmp/jekyll-blog /home/Moon/www/markhansen.co.nz
rm -rf /tmp/jekyll-blog
From f143462fb65ece55d627624833c2a34890492e26 Mon Sep 17 00:00:00 2001
From: Mark Hansen <[email protected]>
Date: Mon, 15 Feb 2010 01:11:59 +1300
Subject: [PATCH] sys.inspect(Date) now shows the date value
---
lib/sys.js | 10 ++++++++++
test/mjsunit/test-sys.js | 10 ++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
desc 'Generate tags page'
task :tags do
puts "Generating tags..."
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')
15 15
###############
#1 #
# # #
# # #
# # #
# #
# # #
# #
# # #
15 15
###############
# #
# ##### ##### #
# # # #
# # # #
# # # #
# # # #
# #
# # # #
###############
#>>>>>>>>>>>>v#
#^##### #####v#
#^# v<v<v<v<#v#
#^# v^v^v^v^#v#
#^# v^v^v^v^#v#
#^# v^v^v^v^#v#
#^<<v^v^v^v^<<#
# #^v^v^v^v # #
# #^v^v^v^v^# #
private static void store_int(byte[] array, int off, int val)
{
array[off + 0] = (byte)((val & 0xff000000) >> 24);
array[off + 1] = (byte)((val & 0x00ff0000) >> 16);
array[off + 2] = (byte)((val & 0x0000ff00) >> 8);
array[off + 3] = (byte)((val & 0x000000ff));
return;
}
private static int extract_int(byte[] array, int off)
var assert = require("assert");
var http = require("http");
var PORT = 8000;
var sys = require("sys");
http.createServer(function (req, res) {
res.writeHeader(200, {"Content-Length": 400});
res.close();
this.close();
}).listen(PORT);
papyon/papyon.protocol.switchboard_manager-INFO: 08/04/10 14:55:27.125792: self is <SwitchboardP2PTransport object at 0xa7937fc (papyon+msnp2p+transport+base+
BaseP2PTransport at 0xa814ea0)>
stderr-ERROR: 08/04/10 14:55:27.291671: Traceback (most recent call last):
stderr-ERROR: 08/04/10 14:55:27.291702: File "/usr/lib/pymodules/python2.6/papyon/switchboard_manager.py", line 81, in <lambda>
stderr-ERROR: 08/04/10 14:55:27.291780: lambda sb, command: self.__on_message_undelivered(command))
stderr-ERROR: 08/04/10 14:55:27.291812: File "/usr/lib/pymodules/python2.6/papyon/switchboard_manager.py", line 155, in __on_message_undelivered
stderr-ERROR: 08/04/10 14:55:27.291903: MessageError.D
@mhansen
mhansen / gist:364402
Created April 13, 2010 07:46
Traceroutes from home to America showing a lot of loss at step 2 (wireless link) over a 2 hour period
Mon Apr 12 16:27:05 +1200 2010
HOST: Moon-Satellite Loss% Snt Last Avg Best Wrst StDev
1. 192.168.1.1 0.0% 10 0.4 0.7 0.4 3.1 0.8
2. 202.180.81.29 80.0% 10 875.4 929.7 875.4 984.0 76.8
3. p238.pool-75.callplus.net.nz 80.0% 10 59.1 217.5 59.1 376.0 224.1
4. vlan7-cpcak3-s1.tranzpeer.ne 70.0% 10 46.6 416.2 46.6 902.9 440.0
5. Gi10-0-0-405.gw1.akl1.asiane 60.0% 10 71.7 557.5 71.7 997.4 475.3
6. po10-0.gw5.lax1.asianetcom.n 70.0% 10 189.7 423.7 189.7 804.7 332.8
7. gi12-0-0.gw3.lax1.asianetcom 80.0% 10 182.7 191.3 182.7 199.9 12.2
8. he.net.coresite.com 60.0% 10 210.6 669.7 210.6 1128. 519.6