# First we'll clone iPXE
$ git clone git://git.ipxe.org/ipxe.git
# Go into the src directory of the cloned git repo
$ cd ipxe/src
# Compile the UEFI iPXE executable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from serde import fields, Model | |
from serde.exceptions import ValidationError | |
class EnumField(fields.Field): | |
""" | |
A field that can hold the value of an `enum.Enum`. | |
Args: | |
type: the concrete `Enum` this field can hold. | |
**kwargs: keyword arguments for the `Field` constructor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Null-cancelling movement script | |
// (prevents you from pressing two opposing directions, which causes you to stop moving) | |
alias +mfwd "-back;+forward;alias checkfwd +forward" | |
alias +mback "-forward;+back;alias checkback +back" | |
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft" | |
alias +mright "-moveleft;+moveright;alias checkright +moveright" | |
alias -mfwd "-forward;checkback;alias checkfwd none" | |
alias -mback "-back;checkfwd;alias checkback none" | |
alias -mleft "-moveleft;checkright;alias checkleft none" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See this for creating a udev rule to avoid the need to be root: | |
# https://peterkieser.com/2013/07/30/accessing-usb-devices-as-non-root-writing-udev-rules-the-easy-way/ | |
# SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1241", ATTRS{idProduct}=="1503", GROUP="mitch", MODE="0660" | |
keymap = { | |
42: 'BACKSPACE', | |
83: 'NUMLOCK', | |
84: '/', | |
85: '*', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> datetime(2013, 12, 31, 23, 59, 59).strftime('%s') | |
'1388530799' | |
>>> datetime(2014, 1, 1, 0, 0, 0).strftime('%s') | |
'1388530800' | |
>>> # such change | |
>>> # much second | |
>>> # cool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# auto-reload supervisor config on a config file change | |
# Licensed under Public Domain | |
# apt-get install inotify-tools | |
while true; do | |
inotifywait --quiet --recursive --event create,close_write /etc/supervisor/ | |
supervisorctl reread | |
supervisorctl update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( window.AG ) { | |
window.AG.reset(); | |
delete window.AG; | |
} | |
var AutoGame = function() { | |
this.gather_btn = $('#gatherButton'); | |
this.traps_btn = $('#trapsButton'); | |
this.buildtrap_btn = $('#build_trap'); | |
this.buildhut_btn = $('#build_hut'); |