Skip to content

Instantly share code, notes, and snippets.

@cfra
cfra / freenas-iohyve.md
Last active February 14, 2018 05:23
A short description on how to use iohyve on FreeNAS 9.10

Introduction

FreeNAS 9.10 is based on FreeBSD 10.3 and as such, supports the BSD hypervisor bhyve. There are different frontends for bhyve, one of them is iohyve which is included in FreeNAS 9.10. This document describes how to setup iohyve for operation on FreeNAS 9.10 and basic VM management tasks.

Setting up Iohyve

Iohyve is already installed in FreeNAS 9.10, so it only needs to be enabled. This is done by adding the following lines to /conf/base/etc/rc.conf:

iohyve_enable="YES"

iohyve_flags="kmod=1 net=igb0 pool=storage-volume"

@husobee
husobee / png-lsb-steg.go
Created August 31, 2014 22:23
VERY simplified LSB stego example on PNGs (lossless)
// example of how to hide data in LSB of colors within a lossless png
package main
import (
"errors"
"flag"
"fmt"
"image"
"image/color"
"image/png"
@rduplain
rduplain / client.py
Created October 5, 2011 19:29
Simple Python HTTP client for tests, maintains cookies.
import cookielib
import urllib
import urllib2
class Client(object):
def __init__(self):
self.cookie_jar = cookielib.CookieJar()
self.opener = urllib2.build_opener(
urllib2.HTTPCookieProcessor(self.cookie_jar))
@frankhenderson
frankhenderson / file.cljs
Last active January 20, 2019 04:34
learning about channels ... context: ClojureScript, nodejs, spawning a child_process
(ns some-project.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :as a :refer [put! <! chan alts! timeout]]))
(nodejs/enable-util-print!)
(def -main (fn [] nil))
(set! *main-cli-fn* -main)
(def spawn (.-spawn (js/require "child_process")))
@rduplain
rduplain / slides.md
Last active February 7, 2019 15:40
Use Werkzeug's web-based interactive debugger with Tornado.

Interactive Debugging in any Python Web Project

Ron DuPlain - PyOhio 2013

Turn this:

@rduplain
rduplain / README.md
Last active April 10, 2019 01:48
Code Quarterly's 2011 Q&A with Rich Hickey, by Michael Fogus

From the Archives: Code Quarterly's 2011 Q&A with Rich Hickey

Rich Hickey is frequently quoted as saying:

You can reach a point with Lisp where, between the conceptual simplicity, the large libraries, and the customization of macros, you are able to write only code that matters. And, once there, you are able to achieve a very high degree of focus, such as you would when playing Go, or playing a musical instrument, or meditating. And then, as with those activities, there can be a feeling of elation that accompanies that mental state of focus.

@rduplain
rduplain / gist:2149194
Created March 21, 2012 16:19
PyCon 2012 Digest for WillowTree Apps

PyCon 2012 Digest

from DevOps team {rduplain,mattd,teebes}, to mobile developers at WillowTree Apps

Pronunciation

@rduplain
rduplain / refresh-hosts.bash
Last active November 8, 2019 21:55
Refresh /etc/hosts file with unpublished IPv4 aliases.
#!/usr/bin/env bash
# Refresh /etc/hosts file with unpublished IPv4 aliases.
#
# Set /etc/hosts.alias with domain/alias pairs, one pair per line:
#
# example.com server-alias
# example.net another
#
# https://github.com/rduplain/hosts
@rduplain
rduplain / nginx-site-include.conf
Last active November 8, 2019 21:55
Configuration files for qwerty.sh deployment on a single server.
# qwerty.sh nginx configuration
#
# gzip is enabled, but only used by clients requesting it:
#
# curl -H 'Accept-Encoding: gzip,deflate' -sSL qwerty.sh
server {
listen 80;
server_name qwerty.sh www.qwerty.sh;
@rduplain
rduplain / README.md
Last active November 28, 2019 00:17
Vagrantfiles for testing configuration management (Ansible).

Vagrantfiles for testing configuration management (Ansible).

Overview

Configuration management that runs over SSH, namely Ansible, benefits in having test machines available on the network. The enclosed Vagrantfiles provide multiple virtual machines to run as guests on the developer's machine. The guests appear as hosts on the LAN, providing a local ephemeral cloud.

The virtual machines here are similar, but different. One provides **Ubuntu