Skip to content

Instantly share code, notes, and snippets.

@akent
akent / update-nvim.sh
Created May 29, 2021 00:01
Simple script to update to latest nightly nvim
#!/bin/sh
set -e
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod +x nvim.appimage
./nvim.appimage --appimage-extract
rm -rf nvim
mv squashfs-root nvim
rm nvim.appimage
@akent
akent / photobooth.py
Last active December 29, 2022 12:47
#!/usr/bin/env python3
#
# photobooth.py
#
# Based on py-slideshow by Corey Goldberg
# Copyright (c) 2013, 2015, Corey Goldberg
# Copyright (c) 2019-2020 Adam Kent
#
# Dev: https://github.com/cgoldberg/py-slideshow
# License: GPLv3
#!/usr/bin/env python
import string
from collections import deque
f = open("input.txt", "r")
data = deque()
for char in f.read():
if char != '\n':
@akent
akent / shp.go
Created September 29, 2017 01:33
get UGC and FIPS from lat/lng
package main
import (
"fmt"
"log"
"github.com/jonas-p/go-shp"
geo "github.com/kellydunn/golang-geo"
)
@akent
akent / code.html
Created November 10, 2014 12:55
Android referrer code using invite:// intent with fallback to play store link
<html>
<body>
<div id='fallback-msg' class='hidden'>
<p>If you are not redirected shortly, you may not have the app installed.</p>
<p><a id='market-link' href="#">Install the app.</a></p>
</div>
<script type='text/javascript'>
var code = 'extract your code here';
if (/Android/i.test(navigator.userAgent)) {

Keybase proof

I hereby claim:

  • I am akent on github.
  • I am akent (https://keybase.io/akent) on keybase.
  • I have a public key whose fingerprint is 77BD FDA3 1283 1F0A FDEE 050C 63AA 4772 2BE0 8122

To claim this, I am signing this object:

@akent
akent / simpleatis.py
Last active May 18, 2023 08:20
Simple ATIS fetching with directly injected request.
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import logging
from suds.client import Client, HttpAuthenticated
from suds.transport import Transport
NAIPS_LOGIN = 'yourloginhere'
NAIPS_PASS = 'yourpasshere'