Skip to content

Instantly share code, notes, and snippets.

View jhburns's full-sized avatar

Jonathan Burns jhburns

View GitHub Profile
@jhburns
jhburns / started.md
Last active November 3, 2017 07:29 — forked from pollend/started.md
Hugo and Webpack
@jhburns
jhburns / Nix Error
Last active November 24, 2018 08:08
error: error creating self-signed certificates: error reading /var/run/kubernetes/apiserver.key, certificate and key must be supplied as a pair
kube-apiserver –tls-cert-file server-key.pem
kube-apiserver --cert-dir /home/demo/server/cert/ --etcd-servers http://127.0.0.1:2379
version: '2'
services:
portainer:
image: portainer/portainer
ports:
- "9000:9000"
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
{ config, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix>
];
programs.fish.enable = true;
users.extraUsers.demo = {
{ config, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix>
];
programs.fish.enable = true;
environment.systemPackages = [

Chapman VPN Setup Debian

Make sure to replace anything in square brackets, [], with your values and remove the brackets.

Install

Run sudo apt install pptp-linux, and select 'Y' (press enter) at the prompt. This tutorial is using version 1.9.0 of pptp and release 18.04 of Ubuntu.

Check Config

@jhburns
jhburns / jcar.fish
Created September 10, 2019 02:59
Should go in ~/.config/fish/functions
function jcar
javac $argv.java -d built; java -cp built/ $argv
end

SSH Forwarding

The purpose of this guide is to show how to authenticate to GitHub while sshing into another computer.

Steps

  1. Follow this guide locally, verify that you can authenticate to GitHub normally.
  2. Add a file config to ~/.ssh/ and save the following content to it:
Host icd.chapman.edu
#!/usr/bin/env bash
while read -rep "Enter input path location: " in_dir; do
if [ -d "${in_dir}" ]; then
echo "${in_dir} already exists - please enter a valid directory path."
else
break
fi
done
// A minimal reimplementation if mizzle's typechecker in CSharp
// https://github.com/jhburns/mizzle/blob/master/src/type_check.rs
using System;
using System.Collections.Generic;
using System.Linq;
// Whats the point of this type?
// For use in other generic types, like say `Result<Unit, string>` or `Outcome<Unit>`
public struct Unit {}