Skip to content

Instantly share code, notes, and snippets.

@awaxa
awaxa / default
Last active Nov 27, 2017
nfhack notes: using nginx-light serving /root/myopenaps
View default
## /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.
View nowplaying.sh
#!/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
View gpg-agent.conf
# 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
View keybase.md

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:

View 0001-fix-source-link-in-self-hosting.md.patch
View bashrc.part.sh
# 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
View apg.rb
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}",
View keybase.md

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:

View clips.txt
file 'a.mp4'
file 'b.mp4'
file 'c.mp4'
View jq-tz.sh
#!/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")'