Skip to content

Instantly share code, notes, and snippets.

View No9's full-sized avatar
🦀
Rusting with a slight chance of code

Anton Whalley No9

🦀
Rusting with a slight chance of code
View GitHub Profile
@No9
No9 / blog
Last active August 27, 2018 15:46
A set of files to act as a template for running a PM2 job in a jail
#!/bin/sh
# PROVIDE: blog
# Save this into /usr/local/etc/rc.d/blog
# Make sure it's executable and validate with
# /usr/local/etc/rc.d/blog rcvar
# This will allow you to stop and start the service with:
# service blog restart
@No9
No9 / imgadm.md
Last active May 11, 2022 08:18
pkgin install
sudo pkgin install gmake
sudo pkgin install gcc5
sudo pkg install onbld  
sudo mv /usr/bin/make /usr/bin/smake                                    
sudo ln -s /usr/bin/gmake /usr/bin/make
sudo ln -s /usr/gnu/i386\-pc\-solaris2.11/bin/ar /usr/bin/ar 
sudo ln -s /usr/gnu/i386\-pc\-solaris2.11/bin/nm /usr/bin/nm 
sudo ln -s /opt/local/gcc5/bin/gcc /opt/local/bin/gcc
sudo ln -s /opt/local/gcc5/bin/g++ /opt/local/bin/g++ 
@No9
No9 / index.js
Last active January 19, 2018 14:26
strong tls
var https = require('https');
var cluster = require('cluster');
var express = require('express');
var fs = require('fs');
var shareTlsSessions = require('strong-cluster-tls-store');
if (cluster.isMaster) {
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;
// Create a worker for each CPU
@No9
No9 / notes.md
Created May 18, 2017 08:11
BSD-Dublin-2017-05-18-Capsicum

Scribble Pad for the May Meetup

@No9
No9 / consuld.sh
Last active October 16, 2021 06:41
consuld - a consul daemon config for freebsd
#!/bin/sh
#
# $FreeBSD: releng/11.0/etc/rc.d/consuld 298514 2016-04-23 16:10:54Z lme $
#
# PROVIDE: consuld
# REQUIRE: LOGIN FILESYSTEMS
# KEYWORD: shutdown
. /etc/rc.subr
@No9
No9 / iocage-meetup.md
Last active July 21, 2020 03:16
Some notes for the BSD Dublin Meetup 2017-04-20
@No9
No9 / helloworld.yaml
Created March 14, 2017 11:35
serverless yaml template for em
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
@No9
No9 / sinopia-manifest.xml
Created July 2, 2016 17:18
Sample config for sinopia on openindiana
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="sinopia">
<service name="site/sinopia" type="service" version="1">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="network" grouping="require_all" restart_on="refresh" type="service">
@No9
No9 / installnode.sh
Created September 11, 2015 23:56
Install node on a base illumOS install
#/bin/sh
pkgin in git
pkgin in gcc49
pkgin in gmake
export PATH=$PATH:/opt/local/gcc49/bin
git clone https://github.com/nodejs/node.git
cd node
#Make sure to change version
git checkout v4.0.0