Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View awaxa's full-sized avatar

Greg Kitson awaxa

View GitHub Profile
@awaxa
awaxa / default
Last active November 27, 2017 05:16
nfhack notes: using nginx-light serving /root/myopenaps
## /etc/nginx/sites-available/default
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#!/usr/bin/env bash
url="$(osascript -e 'tell application "Spotify" to spotify url of current track')"
remove='spotify:track:'
url="${url#$remove}"
url="https://open.spotify.com/track/$url"
echo -n "$url" | pbcopy
@awaxa
awaxa / gpg-agent.conf
Last active June 30, 2017 00:35
~/.gnupg/
# Enables GPG to find gpg-agent
use-standard-socket
# Connects gpg-agent to the OSX keychain via the brew-installed
# pinentry program from GPGtools. This is the OSX 'magic sauce',
# allowing the gpg key's passphrase to be stored in the login
# keychain, enabling automatic key signing.
pinentry-program /usr/local/bin/pinentry-mac

Keybase proof

I hereby claim:

  • I am awaxa on github.
  • I am awaxa (https://keybase.io/awaxa) on keybase.
  • I have a public key ASAo5i-NQjiLA3Jq3uJrePTpc0SoGu_3iV76KVuayidtLQo

To claim this, I am signing this object:

# vi: filetype=sh
ipinfo () {
ip="$1"
curl="curl --silent https://ipinfo.io/$ip"
command -v pbcopy >/dev/null \
&& printf %s "$curl" | pbcopy
if command -v jq >/dev/null ; then
$curl | jq .
else
class Apg < Formula
desc "Tool set for random password generation"
homepage "http://www.adel.nursat.kz/apg/"
url "http://ftp.us.debian.org/debian/pool/main/a/apg/apg_2.2.3.dfsg.1.orig.tar.gz"
sha256 "c7e3c556426e2d5d2f599873a71100c5f6d14fa8784e0b1d879916784de801df"
def install
system "make", "standalone",
"CC=#{ENV.cc}",
"FLAGS=#{ENV.cflags}",

Keybase proof

I hereby claim:

  • I am awaxa on github.
  • I am awaxa (https://keybase.io/awaxa) on keybase.
  • I have a public key whose fingerprint is 4494 69B4 1B54 1207 BAEC 2911 8C12 2F1F E914 3AC9

To claim this, I am signing this object:

file 'a.mp4'
file 'b.mp4'
file 'c.mp4'
@awaxa
awaxa / jq-tz.sh
Last active February 23, 2017 16:28
#!/usr/bin/env bash
# set -v
export TZ=America/Los_Angeles
node -e 'console.log(JSON.stringify({date: (new Date).getTime()}))' | jq '.date/1000 | strftime("%Y-%m-%d %H:%M:%S %Z")'
export TZ=America/New_York
node -e 'console.log(JSON.stringify({date: (new Date).getTime()}))' | jq '.date/1000 | strftime("%Y-%m-%d %H:%M:%S %Z")'
export TZ=UTC
node -e 'console.log(JSON.stringify({date: (new Date).getTime()}))' | jq '.date/1000 | strftime("%Y-%m-%d %H:%M:%S %Z")'