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
Index: Makefile.in
===================================================================
--- Makefile.in (revision 2063)
+++ Makefile.in (working copy)
@@ -1,3 +1,5 @@
+SHELL := @MAKE_SHELL@
+
# Support out-of-tree builds
srcdir := @srcdir@
VPATH := @srcdir@
#!/usr/bin/env ruby
#
# From the book...
# WRITE YOUR OWN ADVENTURE PROGRAMS FOR YOUR MICROCOMPUTER
# J. TYLER & L. HOWARTH
# USBORNE GAMEWRITER'S GUIDE
# ISBN 0 86020 741 2
#
# PORTED FROM BASIC TO RUBY BY
# JOSHUA M. CLULOW
@jclulow
jclulow / README
Created October 4, 2011 22:39
OpenIndiana 151a Automated Installer ISO Construction
Install:
pkg install install/distribution-constructor
Use:
distro_const ai_x86_image_JMC_151a.xml
Find the ISO image in the ZFS dataset you specified in the
XML file, which is "rpool/dc" by default.
@jclulow
jclulow / awk.js
Created November 10, 2011 05:18
Awk in Javascript?
/*
* map predicate to code...
* /regex/ --> function (groups, next)
* ^ ^ function to call if we should
* | \---skip remaining predicates for this line
* \- e.g. groups[1] is first regex group, etc
*/
function line(predicate, codeblock) {
return ({ predicate: predicate, codeblock: codeblock });
@jclulow
jclulow / PLAN.md
Created November 25, 2011 04:53
Planning Document for a Move To Github for illumos-gate

Github for illumos-gate

Benefits

If we move to github for illumos we get various benefits:

  • Code Review through [Pull Requests][ghpr]
  • A Better Issue Tracker than Redmine
  • A Better Wiki than Redmine
@jclulow
jclulow / result.diff
Created November 25, 2011 05:54
fixer script
diff --git a/usr/src/cmd/boot/bootadm/bootadm_upgrade.c b/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
index ddf28c4..61ac69f 100644
--- a/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
+++ b/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
@@ -238,8 +238,8 @@ is_bfu_system(const char *root)
}
#define MENU_URL(root) (is_bfu_system(root) ? \
- "http://www.sun.com/msg/SUNOS-8000-CF" : \
- "http://www.sun.com/msg/SUNOS-8000-AK")
@jclulow
jclulow / 01_sed.diff
Created November 25, 2011 22:26
sed -i handling (illumos)
diff --git a/usr/src/cmd/sed/main.c b/usr/src/cmd/sed/main.c
index 93e14bb..3a3f805 100644
--- a/usr/src/cmd/sed/main.c
+++ b/usr/src/cmd/sed/main.c
@@ -120,7 +120,7 @@ static char *getln(FILE *, size_t *);
int
main(int argc, char *argv[])
{
- int c, fflag;
+ int i, j, c, fflag;
@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 / README.md
Created December 16, 2011 07:31
oddball ps behaviour

So, ps is running somewhat slowly...

asgard # time ps -ef | wc -l
     173

real    0m10.195s
user    0m0.023s
sys     0m9.779s
@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/
{