Skip to content

Instantly share code, notes, and snippets.

View madmod's full-sized avatar

John Wells madmod

  • @-stealth-mode-
View GitHub Profile
@madmod
madmod / README.md
Created June 16, 2022 02:37
Refold Vocab Anki Deck Mobile Mode

What is this?

It's a modification for the excellent Refold Japanese language learning Anki decks which enables showing readings with a gamepad on Anki Mobile. There are also style tweaks to make the fonts easier to read at a distance and hides buttons.

This probably works with other language decks but I haven't tried it.

How does it work?

This hack uses the page scroll event so that you can push the arrow buttons on a gamepad to show readings.

[
{
"body": "Why does Steve quote me so much?",
"name": "Barry Allen",
"location": "Somewhere over the rainbow",
"image": "https://picsum.photos/seed/picsum/1600/1200",
"orientation": "l"
},
{
"body": "I don't like it, it doesn't use a lightbulb",
@madmod
madmod / 00-cloud-config.yml
Created April 11, 2020 04:47 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@madmod
madmod / machine.js
Last active January 30, 2020 20:32
Generated by XState Viz: https://xstate.js.org/viz
const guards = {
isPhoneConfirmed(ctx, event) {
return !!(ctx && ctx.phone && ctx.phoneConfirmed)
}
}
const services = {
getRewards: async () => {
return new Promise((resolve, reject) => {
@madmod
madmod / ⚡️ Fast Docker Builds.md
Last active April 25, 2018 00:19
Its an awesome hack which lets you have a build cache (maven, npm, python, whatever) persist across Docker builds.

Awesome Docker hack for ⚡️ fast builds

Why?

Because downloading half the internet takes a while, and we all (should) have better things to do.

What?

0
@madmod
madmod / keybase.md
Created October 5, 2017 19:47
Keybase proof for madmod

Keybase proof

I hereby claim:

  • I am madmod on github.
  • I am madmod (https://keybase.io/madmod) on keybase.
  • I have a public key ASAtgxfIIzwJldCn5ciaANuETA92ocwVmKuRAGHrchc6awo

To claim this, I am signing this object:

@madmod
madmod / rules.xml
Created September 1, 2017 21:21
S3 routing rules
<RoutingRules>
<RoutingRule>
<Redirect>
<Protocol>https</Protocol>
<HostName>myamareglobal.com</HostName>
<ReplaceKeyPrefixWith>10038/enrollment/register/</ReplaceKeyPrefixWith>
<HttpRedirectCode>302</HttpRedirectCode>
</Redirect>
</RoutingRule>
</RoutingRules>
@madmod
madmod / vive.sh
Last active April 22, 2016 16:46
Obsessively check your HTC Vive order status from the comfort of the command line!
#!/usr/bin/env bash
# Put your order number and password in the quotes here.
VIVE_ORDER=''
VIVE_PASSWORD=''
LOGIN_DATA='Action=PostFindOrderPages&SiteID=htcus&Locale=en_US&ThemeID=38736100&Form=com.digitalriver.template.form.search.FindOrderV2Form&CallingPageID=HelpPage&Env=BASE&ORIG_VALUE_operation=update&operation=search&ORIG_VALUE_orderNumber=&orderNumber='$VIVE_ORDER'&ORIG_VALUE_password=&password='$VIVE_PASSWORD
LOOKUP_URL='https://store.us.htc.com/DRHM/store?Action=DisplayCustomerServiceOrderDetailPage&SiteID=htcus&Locale=en_US&ThemeID=38736100&Env=BASE&requisitionID='$VIVE_ORDER
rm -f /tmp/htccookie.txt;
curl 'https://store.us.htc.com/DRHM/store' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data $LOGIN_DATA --cookie-jar /tmp/htccookie.txt -sS 1> /dev/null;
@madmod
madmod / .cvimrc
Last active April 7, 2016 17:58
My cvim config
" Settings
set nohud
" set nosmoothscroll
" set noautofocus "The opposite of autofocus; this setting stops sites from focusing on an input box when they load
"set typelinkhints
"set cncpcompletion
" let hintcharacters = ";HKLYUIONM,WERTXCVBASDGJF"
let hintcharacters = "asdfghjkl;qweruiop"