Skip to content

Instantly share code, notes, and snippets.

View foopod's full-sized avatar

Jono Shields foopod

View GitHub Profile
@foopod
foopod / earth.sh
Last active February 10, 2022 23:16
script to create and set wallpaper to photos taken from Nasa's EPIC API
#!/bin/bash
TYPE="natural" # natural or enhanced https://epic.gsfc.nasa.gov/about
declare -i XRES=1920
declare -i YRES=1080
declare -i E_RADIUS=$(($YRES * 80 / 100))
DIR=~/.wallpaper
TIMEOFFSET=3 # 3 days in the past (service runs 1-2 days behind + time difference)
@foopod
foopod / scrape.py
Created December 10, 2021 00:15
Scrape Rush Hour Puzzles
import requests
def getPuzzle(id):
response_API = requests.get('http://mathsonline.org/game/jam%s.js'%(id))
output = []
lines = response_API.text.split('\n')
lorryIndex = 0
carIndex = 0
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
@foopod
foopod / main.lua
Created April 2, 2019 05:16
A super fun game that we made at codeclub (kinda broken)
platform = {}
player = {}
obstacle = {}
gameover = {}
rbutton = {}
score = {}
function love.load()
love.physics.setMeter(64) --the height of a meter our worlds will be 64px
world = love.physics.newWorld(0, 9.81*64, true) --create a world for the bodies to exist in with horizontal gravity of 0 and vertical gravity of 9.81
var ctx;
var canvas;
var size = 5;
var x = 0;
var y = 0;
var gridSize = 150;
var grid = createArray(gridSize, gridSize);

This is a repost of my advice from 3 years ago. Sorry to those who have seen it all before, it is my personal mission to educate my peers on their tenancy rights and responsibilities.

NOTE: This advice is for tenants only, and does not apply to flatmates. See here to determine which you might be.

Since it's renting season, I thought I'd pass on a few bits of information I've learnt in my short renting experience.

TL;DR: Um, not really sure, maybe read the first sentence in each section?

NLE;WM (Not Long Enough; Want More): Read the RTA.

NOTE: the below was done on Ubuntu 16.04

Set up hostname - Google how to do this

add to /etc/hosts/

45.79.77.214 bessie

Making SSH directory? I think

@foopod
foopod / log.txt
Created December 13, 2016 05:11
BT Log from Connection with Sphero.js :( Does not connect
Dec 13 17:16:37.506 NOTE 0x0000 OS X Version 10.11.6 (Build 15G1108) / Model ID: MacBookPro12,1
Dec 13 17:16:37.507 NOTE 0x0000 Bluetooth Software Version: 4.4.6f1 17910
Dec 13 17:16:37.508 NOTE 0x0000 Host Controller: Broadcom / 0x05AC / 0x8290 / v119 c4633 / Built-In (Yes) / Location ID (0x14300000)
Dec 13 17:16:37.508 NOTE 0x0000 Support: Deep Idle (Yes) / WoBT (Yes) / BTRS (No) / New Idle Policy (Yes) / Idle Time (500 ms)
Dec 13 17:16:37.508 NOTE 0x0000 CONNECTED: E6:89:B3:8F:AB:88 - Handle: 0x0041 - 0x0000 - "2B-AB88"
Dec 13 17:16:40.783 HCI COMMAND 0x4102 [2015] LE Read Channel Map - Connection Handle: 0x0041
Dec 13 17:16:40.783 KERNEL DEBUG 0x0000 [0xB000] [IOBluetoothHCIRequest][Start] -- OpCode 0x2015 (LE Read Channel Map) from: system_profiler (634) Synchronous status: 0x00 (kIOReturnSuccess) state: 2 (BUSY) timeout: 6543
Dec 13 17:16:40.784 HCI EVENT 0x0000 [2015] Command Complete - LE Read Channel Map
Dec 13 17:16:40.785 HCI COMMAND 0x0041 [1406] Read AFH Channel Map - Connection Handle: 0x00
@foopod
foopod / hTerm
Last active December 13, 2016 01:08
Hyper Terminal Config
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'yellow',