Skip to content

Instantly share code, notes, and snippets.

@Jbithell
Jbithell / crontab
Last active August 16, 2022 17:15
Boot a raspberry Pi into VLC
SHELL=/bin/bash
MAILTO=""
@reboot $HOME/monitor boot >> "$HOME/log/monitor.log" 2>&1
*/1 * * * * $HOME/monitor >> "$HOME/log/monitor.log" 2>&1
@Jbithell
Jbithell / CLA.md
Created September 28, 2021 16:48
AdamRMS CLA

AdamRMS Individual Contributor Assignment Agreement

Thank you for your interest in contributing to AdamRMS, a Bithell Studios Limited Product ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, you agree to it through a Github pull request comment. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

"You" means the individual who Submits a Contribution to Us.

"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright.

@Jbithell
Jbithell / graphicalEQ.html
Created April 18, 2019 10:27
Graphical EQ based on a tweet
<script>
//https://twitter.com/jake_albaugh/status/1118611365508337665
var l = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
var x;
var a;
var d;
document.onclick = function () { //jb edit to work with chrome 70
x = new AudioContext();
a = x.createAnalyser();
a.fftSize = 32;
@Jbithell
Jbithell / joystickTest.ino
Created April 19, 2018 19:34
For use in conjunction with https://github.com/ETCLabs/lighthack/tree/master/user_projects/nunchuk - replace the main arduino code with this and open arduino serial terminal to check joystick calibration
#include <Wire.h>
#include "WiiLib.h"
WiiChuck chuck = WiiChuck();
void setup() {
Serial.begin(9600);
chuck.begin();
chuck.update();
chuck.calibrateJoy();
@Jbithell
Jbithell / Westminster Parties.json
Last active May 20, 2017 18:40
Parties of the Houses of Parliament in the UK
{
"Con":{
"colour":"#0087DC",
"name" : "Conservative and Unionist Party",
"wikidescription" : "A party loosely divided into three categories: The Thatcherites or Conservative Way Forward, who strongly support a free market and tend to be Eurosceptic; the economically moderate, often more pro-European but socially conservative One Nation Conservatives; and the socially conservative, deeply Eurosceptic Cornerstone Group."
},
"Lab":{
"colour":"#DC241F",
"name" : "Labour Party",
"wikidescription" : "A big tent party historically allied with the trade union movement; based upon mixed market Third Way policies since the party was reinvented as New Labour in 1994. As a big tent party, it includes a range of views including New Labour, Socialists such as those belonging to the Socialist Campaign Group, and Social Democrats."
@Jbithell
Jbithell / iframe.html
Created September 11, 2016 19:24
Full page iframe
<!DOCTYPE html>
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<title></title>
<style>
html {
overflow: auto;
}
@Jbithell
Jbithell / README.md
Last active September 10, 2016 18:42
Raspberry Pi - Photo Booth!

Make sure you run chmod -R 777 uploads/ and change line 5 of upload.py to the target machine's IP!

@Jbithell
Jbithell / welshubuntu.bash
Created September 4, 2016 14:57
Welsh Language support on ubuntu
sudo locale-gen cy_GB
sudo locale-gen cy_GB.UTF-8
sudo update-locale
locale -a
@Jbithell
Jbithell / snapshotmyself.sh
Last active July 9, 2016 09:54
A system for snapshotting a droplet itself on DO
#!/bin/bash
#THIS SCRIPT MUST BE RUN AS ROOT
token=""
dropletid=""
dumpmysqlpass="password" #Set this to what you set in the setup!
cd /
mysqldump -u dump -p $dumpmysqlpass --all-databases > /databasebackup.sql #Dump the MySQL
doctl compute droplet-action snapshot $dropletid --wait --snapshot-name "Regular Auto Snapshot whilst running." -t $token #Run the snapshot