Skip to content

Instantly share code, notes, and snippets.

@air
air / try_realms_api.sh
Last active Jun 14, 2021
Let's use the Realms API to download our world backup!
View try_realms_api.sh
#!/bin/bash
# you need httpie (apt-get install httpie)
# you need to replace <these things> with your details
# run with 'source' to export vars to your shell for experimentation
# 1. authenticate to get an access token
auth_server=https://authserver.mojang.com
user=<your login email>
View halo2600.asm
; Retro-Halo by Eddy Fries - edf@halcyon.com
processor 6502
include vcs.h
org $F000
; Compile switches
NTSC = 0
PAL = 1
PAL60 = 2
@air
air / p1_keyboard.ini
Created Oct 11, 2015
Dolphin profiles for New Super Mario Bros
View p1_keyboard.ini
[Profile]
Device = DInput/0/Keyboard Mouse
Buttons/A = X
Buttons/B = C
Buttons/1 = LSHIFT
Buttons/2 = SPACE
Buttons/- = V
Buttons/+ = B
Shake/X = Z
Shake/Y = Z
@air
air / flip.html
Last active Nov 9, 2020
flip colours and images at 60fps
View flip.html
<html>
<!--
- GIF is too slow
- flipping colours in JS is easy
- Using backgroundImage is flickery
- With preload: fixed!
-->
<head>
<style>
body {
View arp_to_ifttt.py
import socket
import struct
import binascii
import time
import json
import urllib2
# Use your own IFTTT key, not this fake one
ifttt_key = '9cn3847ntc8394tn8-ab'
# Set these up at https://ifttt.com/maker
@air
air / checkgit.sh
Last active Jul 12, 2018
Quickly check all your git repos for local & remote changes.
View checkgit.sh
#!/bin/bash
set -o nounset
set -o errexit
[[ ! -z ${DEV} ]] || { echo "DEV is not defined"; exit 1; }
# for each dir in DEV
checkouts=$(find $DEV -maxdepth 1 -type d)
for dir in ${checkouts}; do
@air
air / steam.sh
Last active Aug 30, 2018
Setup script to run Steam on Chromebook using a library on an external SD card.
View steam.sh
#!/bin/bash
set -o nounset
# 2016-01-02 updated to use whichever device the card is mounted on.
# 2016-07-28 update to use ext4 or fuseblk
# Params
#--------------------------------------------------------------------
# 1. where ChromeOS mounts your SD card
@air
air / autoexec.cfg
Last active Aug 29, 2015
DotA autoexec.cfg
View autoexec.cfg
con_enable 1
// big hero icons on map
dota_minimap_hero_size 900
// no zooming
dota_camera_disable_zoom 1
// right-click to deny
dota_force_right_click_attack 1
@air
air / Onename verification
Created Aug 9, 2014
Onename verification.
View Onename verification
Verifying myself: My Bitcoin username is +aaronbell. https://onename.io/aaronbell
View First C64 demo.bas
00 rem my first demo. changing the volume register gives a click!
10 sid=54272 : volume=sid+24
20 col=53280
30 for i = 0 to 28 : poke sid + i, 0 : next
40 for i = 0 to 15 : poke volume, i : poke col, i : next
50 goto 40