Skip to content

Instantly share code, notes, and snippets.

View pattersongp's full-sized avatar

Graham Patterson pattersongp

View GitHub Profile
@pattersongp
pattersongp / seashell.c
Created August 16, 2018 14:20
Simple UNIX shell
/*
* Graham Patterson
* Simple shell program
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define MAX_SIZE 256
@pattersongp
pattersongp / directions.md
Last active May 29, 2020 01:47
Installing Ubuntu onto a USB from MacOS

Installing Ubuntu onto USB on MacOS

You'll need:

  • An Ubuntu ISO downloaded from here
  • USB stick
  1. $ hdiutil convert -format UDRW ~/Downloads/ubuntu-18.04.1-desktop-amd64.img -o ~/Downloads/ubuntu-18.04.1-desktop-amd64.iso
  2. $ diskutil unmountDisk /dev/disk3
  3. $ sudo dd if=~/Downloads/ubuntu-18.04.1-desktop-amd64.img.dmg of=/dev/rdisk3 bs=1m
/*
* Concepts Example:
*/
#include <iostream>
using namespace std;
template<typename T>
concept bool Addable = requires(T a, T b) {