Skip to content

Instantly share code, notes, and snippets.

@akent
akent / update-nvim.sh
Created May 29, 2021
Simple script to update to latest nightly nvim
View update-nvim.sh
#!/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
View photobooth.py
#!/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
View aoc-2018-day05-part2.py
#!/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 Sep 29, 2017
get UGC and FIPS from lat/lng
View shp.go
package main
import (
"fmt"
"log"
"github.com/jonas-p/go-shp"
geo "github.com/kellydunn/golang-geo"
)
@akent
akent / code.html
Created Nov 10, 2014
Android referrer code using invite:// intent with fallback to play store link
View code.html
<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)) {
View keybase.md

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 Jun 19, 2022
Simple ATIS fetching with directly injected request.
View simpleatis.py
#!/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'