Skip to content

Instantly share code, notes, and snippets.

View foopod's full-sized avatar

Jono Shields foopod

View GitHub Profile
@foopod
foopod / pocky.ipynb
Last active May 8, 2024 19:59
Pocky.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@foopod
foopod / pocky.ipynb
Created May 5, 2024 18:18
Pocky.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@foopod
foopod / pocky.ipynb
Created May 5, 2024 07:55
Pocky.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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