Skip to content

Instantly share code, notes, and snippets.

Avatar

John johnramsden

View GitHub Profile
@johnramsden
johnramsden / OS161_set-up.md
Created Sep 9, 2019 — forked from gerito1/OS161_set-up.md
A simple guide to have running the os161 kernel in Arch Linux
View OS161_set-up.md

A simple guide to have running the os161 kernel in Arch Linux

This are some notes for the course OS 161 from ops-class.org (based on the OS 161 course from Harvard).

#Geting started

You will need some tools. A nice Text Editor or a fancy IDE for C, I usually go for gedit, or sometimes vim.

Then you will need to install all the toolchain for the course plus some other tools

View nano-shorts.md

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@johnramsden
johnramsden / arch-linux-basic-surface.md
Last active May 13, 2020
Basic arch linux install on surface
View arch-linux-basic-surface.md

Arch Linux Install on the Surface Pro 4

From blog post Arch Linux on The Surface Pro 4. Created for Jordi Higuera

If you do have access to a hub, and you have physical access to the machine, letting you plug a keyboard in, you're probably better off using a fresh install ISO. From the Arch Download page download an up to date ISO.

Partitioning

If you've already gone through the steps of shrinking your SSD to give you some extra room on your SSD, once you've booted in to the ISO run lsblk you should see something like this:

View keybase.md

Keybase proof

I hereby claim:

  • I am johnramsden on github.
  • I am johnramsden (https://keybase.io/johnramsden) on keybase.
  • I have a public key ASB_hvuhzxWtb9hwmIcgK9TlLOdZsQoFgUOcKaUfK0yvkQo

To claim this, I am signing this object:

@johnramsden
johnramsden / putty-monokai.reg
Created Aug 22, 2016 — forked from gdvalle/putty-monokai.reg
Monokai style theme for PuTTY; colors copied from ST2's theme
View putty-monokai.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\monokai]
"Colour21"="255,255,255"
"Colour20"="245,222,179"
"Colour19"="200,240,240"
"Colour18"="0,217,217"
"Colour17"="179,146,239"
"Colour16"="174,129,255"
"Colour15"="122,204,218"
@johnramsden
johnramsden / zfsinstall-1-setup.sh
Last active Oct 7, 2020
Install scripts for installing Arch Linux on ZFS. Not runnable, just listed commands.
View zfsinstall-1-setup.sh
#!/bin/bash
# Check before running, may need intervention
# Pass in the following to the script, or hardcode it.
# Uncomment if hardcoding input.
BOOT_PARTITION="/dev/sdg1"
DISK_1="ata-SanDisk_SDSSDXPS480G_152271401093"
DISK_2="ata-SanDisk_SDSSDXPS480G_154501401266"
POOL="vault"
@johnramsden
johnramsden / writehostid.c
Created Jun 21, 2016
File to change hostid on Arch linux after a ZFS install.
View writehostid.c
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
int main() {
int res;
res = sethostid(gethostid());
if (res != 0) {
switch (errno) {
case EACCES:
@johnramsden
johnramsden / openvpn-pia.bash
Last active Jun 7, 2020
Freebsd openvpn bash script. Used to automate setup of OpenVPN on Private Internet Access.
View openvpn-pia.bash
#!/usr/local/bin/bash
###############################
# Created by John Ramsden
# Github Ramsdenj
###############################
# Used script by jedediahfrey@github and post by Tango@FreeNAS forums as reference
# https://forums.freenas.org/index.php?threads/guide-setting-up-transmission-with-openvpn-and-pia.24566/
View pia.sh
#!/bin/tcsh
# Grab user information.
echo "PrivateInternetAccess OpenVPN Setup:"
echo " https://www.privateinternetaccess.com/pages/client-control-panel"
echo " -> PPTP/L2TP/SOCKS Username and Password"
echo -n "User: "
set user = $<
echo -n "Pass: "
set pass = $<
You can’t perform that action at this time.