Skip to content

Instantly share code, notes, and snippets.

View johnramsden's full-sized avatar

John johnramsden

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

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

@johnramsden
johnramsden / nano-shorts.md
Created March 12, 2019 05:54 — forked from franz-josef-kaiser/nano-shorts.md
nano keyboard shortcuts

^ = 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 January 27, 2023 19:33
Basic arch linux install on surface

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:

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 August 22, 2016 21:17 — forked from gdvalle/putty-monokai.reg
Monokai style theme for PuTTY; colors copied from ST2's theme
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 June 6, 2024 09:43
Install scripts for installing Arch Linux on ZFS. Not runnable, just listed commands.
#!/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 June 21, 2016 22:28
File to change hostid on Arch linux after a ZFS install.
#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 February 20, 2022 22:08
Freebsd openvpn bash script. Used to automate setup of OpenVPN on Private Internet Access.
#!/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/
@johnramsden
johnramsden / pia.sh
Created November 27, 2015 22:14 — forked from dapperfu/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 = $<