Skip to content

Instantly share code, notes, and snippets.

@willprice
willprice / git_setup.sh
Created December 24, 2015 21:26
git setup
git config --global user.email "will.price94+dev@gmail.com"
git config --global user.name "Will Price"
git config --global core.editor viim
# Short commands
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.lg 'log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit'
@willprice
willprice / README-internet-sharing-raspberry-pi.md
Last active October 20, 2016 10:49
Setting up point to point networking on Raspbian with the Raspberry Pi 2

Sharing internet from a laptop/desktop to a Raspberry pi

Assumptions:

  • You're running linux on your laptop/desktop
  • laptop/desktop has an internet connection
  • You've got an ethernet cable between the Raspberry Pi and laptop/desktop

Setup the connection

On the host (e.g. laptop with internet connection):

@willprice
willprice / README-opencv-3.1-raspberry-pi-installation.md
Last active May 14, 2021 08:24
How to install OpenCV 3.1 on Raspbian Jessie (Lite)

Installing OpenCV 3.1 on Raspbian Jessie

Prerequisites

  • Keep your system up to date:
    • $ sudo apt-get update
    • $ sudo apt-get upgrade
    • $ sudo reboot
  • Make sure you've got an internet connection.
  • Make sure you've got
  • wget
@willprice
willprice / README.md
Last active January 9, 2016 15:46
Command to flash the Arduino Due GCode (CNC controller) software called G2 (a fork of TinyG) to an Arduino Due

Instructions

  1. Press 'Reset' on the Duet (RepRap Pro board)
  2. wait ~1 second
  3. Run ./g2_flash.sh
@willprice
willprice / BubbleSort.java
Created March 27, 2016 18:31
Bubble sort using parameterised and property based tests
package org.willprice.sorting;
public class BubbleSort {
boolean swapped = true;
public int[] sort(int[] array) {
while (swapped) {
swapped = false;
bubble(array);
}
@willprice
willprice / boot-files.tree
Last active June 30, 2016 16:09
rEFInd configuration
.
├── backup
│   └── grub
│   └── grub.cfg
├── EFI
│   ├── BOOT
│   │   ├── bootx64.efi
│   │   ├── drivers_x64
│   │   │   ├── btrfs_x64.efi
│   │   │   ├── ext2_x64.efi

Taskwarrior on Android 6

I had a few issues getting task warrior working on Android 6, so when I inevitably need to set this up again, hopefully I'll remember that I've written this document.

First configure .taskrc.android with the following keys:

  • taskd.server
  • taskd.key
  • taskd.certificate
  • taskd.ca
  • taskd.credentials
@willprice
willprice / DevBox.BoxStarter.ps1
Created July 27, 2016 21:37
Boxstarter seemingly rebooting constantly
Update-ExecutionPolicy Unrestricted
# System settings
Enable-MicrosoftUpdate
Install-WindowsUpdate -AcceptEula -GetUpdatesFromMs -SupressReboots
Set-StartScreenOptions -EnableBootToDesktop
## Windows features
choco install -y IIS-WebServerRole -source WindowsFeatures
# Desktop settings
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives `

Keybase proof

I hereby claim:

  • I am willprice on github.
  • I am willprice (https://keybase.io/willprice) on keybase.
  • I have a public key whose fingerprint is CC72 6003 1EF7 AA27 17CD 1A73 BB32 C350 AEA0 A298

To claim this, I am signing this object:

@willprice
willprice / echo-ws-server.pl
Created March 22, 2017 14:36
SWI-Prolog echo server with some JSON manipulation using websockets.
% INSTRUCTIONS
% =swipl echo-server.pl=
% =:- start_server.=
%
% Then navigate to http://localhost:3000 in your browser
:- module(echo_server,
[ start_server/0,
stop_server/0