Skip to content

Instantly share code, notes, and snippets.

View jclulow's full-sized avatar
🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic

Joshua M. Clulow jclulow

🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic
View GitHub Profile
@jclulow
jclulow / sfw_106.diff
Created November 30, 2011 11:10
SFW for Stable
# HG changeset patch
# User sfwbuild@sfw0
# Date 1322636825 -39600
# Branch oi_151a
# Node ID 8c0f45c508837f33f4d4cebba1b541e0a0c25ffb
# Parent 4c78dcc5e8bda51afb5826dd1a2e77a910ead117
bump apache to 2.2.21, apr to 1.4.5, apr-util to 1.3.12
diff -r 4c78dcc5e8bd -r 8c0f45c50883 usr/src/cmd/apache2/httpd-2.2.16.tar.gz
Binary file usr/src/cmd/apache2/httpd-2.2.16.tar.gz has changed
@jclulow
jclulow / 00_script.d
Created December 17, 2011 02:32
More Data on slow /dev walk
syscall::stat:entry
/pid == $target/
{
self->start = timestamp;
self->file = arg0;
}
syscall::stat:return
/pid == $target/
{
@jclulow
jclulow / portmutex.js
Created January 12, 2012 02:59
node.js process mutual exclusion?
var net = require('net');
var events = require('events');
var util = require('util');
function PortMutex(portnumber, delay) {
events.EventEmitter.call(this);
var self = this;
if (!portnumber)
throw new Error('must provide port number');
@jclulow
jclulow / fixer.ksh
Created February 4, 2012 06:22
[REVIEW] 763 FMD msg URLs should refer to something visible
#!/bin/ksh
WS="/ws/illumos-gate"
# this list generated with:
# git grep -l sun.com.msg | cat -
#
FILE_LIST="
usr/src/cmd/boot/bootadm/bootadm_upgrade.c
usr/src/cmd/fm/dicts/ZFS.po
@jclulow
jclulow / fib.js
Created March 12, 2012 00:54 — forked from ry/fib.js
a proper fibonacci server in node. it will light up all your cores.
var os = require('os');
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
@jclulow
jclulow / a.c
Created April 13, 2012 07:18
toying with ::findleaks and umem
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
void
strmess(const char *in)
{
static char *y;
@jclulow
jclulow / do_rsync.js
Created April 16, 2012 06:12
single-user ssh+rsync-based webrev@ to replace cr.illumos.org
#!/opt/local/bin/node
var fs = require('fs');
var util = require('util');
var ins = util.inspect;
var exit = process.exit;
var path = require('path');
var spawn = require('child_process').spawn;
function log(str) {
@jclulow
jclulow / ptree.sh
Created April 19, 2012 05:23
ptree for linux
#!/bin/bash
if [[ $# -gt 0 ]]; then
if expr $1 : '^[0-9]*$' > /dev/null; then
ARGS="-p $1"
shift
while [[ $# -gt 0 ]]; do
ARGS="${ARGS},$1"
shift
done
@jclulow
jclulow / 00_output.txt
Created April 24, 2012 05:23
FORWARD(S) PROGRESS!
*** DBOOT DONE -- back to asm to jump to kernel
*** Entered Solaris in _start() cmdline is: http://store0.sys.syd.distra.com/tmp/ipxe/platform0/i86pc/kernel/amd64/unix -B console=ttya,kbm_debug=true,prom_debug=true,map_debug=true -kdv
next_phys is 2ca3000
next_virt is 2ca3000
Initializing boot time memory management...done
@jclulow
jclulow / gist:2494575
Created April 25, 2012 23:56
bug in "df -h"
steps to reproduce:
1. make a cifs share on another host
2. mount it with smbfs
3. unshare the cifs share on that other host
4. df -h
problem:
dumps core with arithmetic exception here: