Skip to content

Instantly share code, notes, and snippets.

View danmack's full-sized avatar

Dan Mack danmack

View GitHub Profile
@glinton
glinton / smart-pub.md
Last active September 1, 2023 04:34
SmartOS zone manipulation. Snapshot, image, rollback, and migrate.

SmartOS Zone Manipulation

Notes on snapshots, images, and migrations

Create Zone/KVM

# Create zone
vmadm create <<EOL
{
 "brand": "joyent",
 .
@gregnavis
gregnavis / sudoku.rb
Created April 13, 2013 22:44
A simple Sudoku solver in Ruby.
class Sudoku
SIZE = 9
NUMBERS = (1..9).to_a
def initialize
@board = Array.new(SIZE) { Array.new(SIZE, nil) }
end
def [](x, y)
@board[y][x]
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};