Skip to content

Instantly share code, notes, and snippets.

#!/usr/sbin/dtrace -qs
/*
* AUTHOR: Craig Morgan (craig@cinnabar-solutions.com)
* DATE: 2005-04-12 (last updated: 2009-07-23)
* TAGS: @cluster, @ds
*
* FILE: zone_status.d
* DESC: Track zone/container status changes in realtime on a Solaris10/OpenSolaris based system,
* note that this depends on a non-stable private interface subject to change.
* MOD: 2009-07-23 - Modified to reflect updated status codes in OS2009.06/Sol10u4 onward
## Solaris WebConsole timeout value
You can manipulate the Solaris WebConsole's timeout (and hence disconnect) value (in minutes) with:
$ wcadmin add -p -a console session.timeout.value=5
defaults write com.apple.ScreenSharing controlObserveQuality n
...changes the quality of the connection's display, based on the value of n:
1 = black and white
2 = grayscale
3 = 8-bit color
4 = 16-bit color
5 = full color
URL Shortener Header Comparison
===============================
Source URL:
http://news.bbc.co.uk/1/hi/uk_politics/election_2010/the_debates/default.stm
Shortened URLs:
http://is.gd/bKDF6
@crgmrgn
crgmrgn / stdin.txt
Created July 4, 2012 13:35
Human Readable numbers (by Marco Rogers)
function humanReadable(obj, decPrec) {
decPrec = decPrec || 2;
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
if(typeof obj == 'number') {
var ctr = 0;
while(obj > 1024 && ctr < units.length-1) {
ctr++;
obj = obj/1024;
}
return (decPrec ? obj.toFixed(decPrec) : obj) + units[ctr];

Keybase proof

I hereby claim:

  • I am crgmrgn on github.
  • I am crgmrgn (https://keybase.io/crgmrgn) on keybase.
  • I have a public key whose fingerprint is F420 07A3 AF00 77AE 2A08 1A1E 7C7A 4191 9AB7 F636

To claim this, I am signing this object:

@crgmrgn
crgmrgn / catch_crash_log
Created October 22, 2014 22:40
CrashReporter log for Catch 1.9 instance
Process: Catch [39671]
Path: /Applications/Catch.app/Contents/MacOS/Catch
Identifier: org.giorgiocalderolla.Catch
Version: 1.9 (1.9)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Catch [39671]
User ID: 501
Date/Time: 2014-10-22 23:21:50.155 +0100
Process: Catch [806]
Path: /Applications/Catch.app/Contents/MacOS/Catch
Identifier: org.giorgiocalderolla.Catch
Version: 1.9 (1.9)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Catch [806]
User ID: 501
Date/Time: 2014-10-18 11:28:28.877 +0100
Verifying I am +craigmorgan on my passcard. https://onename.com/craigmorgan

Youtube Chapter Markers

Youtube now extracts chapter markers from the description of any video, the ideal markup is shown below (although it is somewhat flexible and tries to accept some variability).

00:00 Intro 
00:38 Design 
04:15 Touch ID 
06:21 Display