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 / install-cos-openshift.sh
Last active March 31, 2020 00:14
install-cos-openshift.sh
#/bin/sh
# Default script for provisining a core dump handler environment.
# See: https://github.com/No9/ibm-core-dump-handler
# Assumes login of ibmcloud is already performed and helm v3 is installed on the local machine
# Change this clustername to install on the specific cluster or pass it with -c
# e.g. ./install-cos.sh -c kcdt-test-002
CLUSTER_NAME='kcdt-test-002'
@No9
No9 / install-cos.sh
Last active March 27, 2020 11:43
A script to provision and configure a cloud object store instance on IBM Cloud Kuberenetes Service
#/bin/sh
# Default script for provisining a core dump handler environment.
# See: https://github.com/No9/ibm-core-dump-handler
# Assumes login of ibmcloud is already performed and helm v3 is installed on the local machine
# Change this clustername to install on the specific cluster or pass it with -c
# e.g. ./install-cos.sh -c kcdt-test-002
CLUSTER_NAME='kcdt-test-002'
@No9
No9 / pilot.json
Created December 23, 2018 01:19
Pilot Sample JSON
{
"consul": "consul:8500",
"preStart": "/bin/reload-nginx.sh preStart",
"logging": {
"level": "DEBUG",
"format": "text"
},
"services": [
{
"name": "nginx",
@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 / 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 / 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 / gist:3217890
Created July 31, 2012 15:37
Google IO 2012 Breaking the JavaScript Speed Limit with V8
@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">