Skip to content

Instantly share code, notes, and snippets.

View MerlinDMC's full-sized avatar
🏠
Working from home

Daniel Malon MerlinDMC

🏠
Working from home
View GitHub Profile
@MerlinDMC
MerlinDMC / setup_pkgsrc_buildzone.sh
Created December 18, 2014 16:15
setup a SmartOS zone for building pkgsrc packages
#!/bin/bash
# skip if we already have the env set up
if [[ ! -e /content/pkgsrc ]]; then
PKGSRC_REPO_URL=$(awk '{ print $2 }' FS='=' /opt/local/etc/pkg_install.conf)
PKGSRC_BRANCH=$(awk '{ print $(NF-2) }' FS='/' /opt/local/etc/pkg_install.conf)
PKGSRC_BINPKG_SITES=${PKGSRC_REPO_URL%/*}
pkgin -y in gcc47 git-base

Keybase proof

I hereby claim:

  • I am merlindmc on github.
  • I am merlindmc (https://keybase.io/merlindmc) on keybase.
  • I have a public key whose fingerprint is F3E6 5056 58B9 6FE4 F38B C17C FCB9 7856 BBA5 B14D

To claim this, I am signing this object:

@MerlinDMC
MerlinDMC / recreate.js
Created October 15, 2012 06:44
recreate SmartOS imgadm database from cache
#!/usr/node/0.8/bin/node
var fs = require('fs');
var imgadm = require('/usr/img/node_modules/imgadm');
var db = require('/usr/img/node_modules/db');
var DB_PATH = '/var/db/imgadm';
db.list(function(err, uuids) {