Skip to content

Instantly share code, notes, and snippets.

@jperkin
jperkin / smartos-pppoe-router.md
Last active December 5, 2022 22:44
SmartOS PPPoE Router (AAISP, v6, DNS/DHCP)

Intro

This documents my setup of a SmartOS server as my PPPoE router, providing DNS/DHCP services to the local network.

Basic setup:

  • DSL modem (VMG1312) in bridge mode handling the DSL connection
  • 192.168.1.0/24 local network
  • 192.168.1.5 will be the IP address of the router zone
  • e1000g0 is the configured internal 'admin' interface

Setting up netboot.xyz with an EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Assumptions

I've made a few assumptions throughout this document that will probably be different for your setup:

@bahamas10
bahamas10 / install.txt
Created March 9, 2015 15:25
install isolated ruby and chef on smartos
(as root)
mkdir ~/src
cd ~/src
# install ruby
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz
tar xf ruby-2.2.1.tar.gz
cd ruby-2.2.1
./configure --prefix=/opt/chef --with-opt-dir=/opt/local --enable-shared ac_cv_func_dl_iterate_phdr=no CFLAGS="-R -fPIC" rb_cv_have_signbit=no --disable-install-doc
@mgerdts
mgerdts / README.md
Created October 18, 2019 11:56
Triton on Linux KVM

Triton on Linux KVM

I have a beefy Linux box that I use for development. One of the things this box does is run KVM instances that run a Triton headnode and several compute nodes.

Configuration

Networking

I have a single gigabit link to the outside world. All networks are able to reach the outside world via NAT.

@AlainODea
AlainODea / splunkforwarder-manifest.xml
Last active February 10, 2020 15:57
Splunk Forwarder SMF Manifest
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='site/splunkforwarder' type='service' version='0'>
<create_default_instance enabled='true'/>
<single_instance/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='splunk_multi-user' grouping='require_all' restart_on='none' type='service'>
@bahamas10
bahamas10 / 0-README.md
Last active January 4, 2019 18:02
Joyent Manta Functions
@trentm
trentm / googl.sh
Created July 31, 2013 22:27
Bash function to use the goo.gl URL shortener on stdin. See <https://developers.google.com/url-shortener/v1/getting_started> TODO: pbcopy it too if that command is available
# echo URL | googl
function googl {
local url=$(cat <&0)
(
set -e pipefail;
echo "{}" \
| json -e "this.longUrl='$url'" \
| curl -sf https://www.googleapis.com/urlshortener/v1/url \
-H 'Content-Type: application/json' -d@- \
| json id
@bahamat
bahamat / nginx_log_format_bunyan.conf
Last active September 14, 2016 08:12
nginx log_format bunyan
log_format bunyan '{'
'"name": "nginx/$nginx_version",'
'"hostname": "$hostname",'
'"pid": "$pid",'
'"level": 30,'
'"time": "$time_iso8601",'
'"v": 0,'
'"msg": "access",'
'"remoteAddress": "$remote_addr",'
@dgwynne
dgwynne / bunyan.lua
Created July 12, 2016 05:08
lua bunyan
local logfile = require("logfile")
local P = require("posix")
local cjson = require("cjson")
local cookies = require("http_cookies")
local _M = {
fatal = 60,
error = 50,
warn = 40,
| From: "Roger A. Faulkner" <Roger.Faulkner@Eng>
| Subject: Re: curiosity: truss?
| Date: Wed, 27 Jan 1999 23:34:47 -0800 (PST)
|
| For your edification, this is the geneaology of the name "truss"
| (taken from some mail dated Sep 26, 1988)
| This was when Ron Gomes and I were jointly developing the first
| /proc for SVR4 at USL.
| -----------------------------------------------------------------
|