Skip to content

Instantly share code, notes, and snippets.

View daryltucker's full-sized avatar

Daryl Tucker daryltucker

  • Neo-Retro Group
  • Salem, Or
View GitHub Profile
@daryltucker
daryltucker / gist:ae3b42251f3da7bcd311f0554eaf3738
Created December 12, 2019 22:25 — forked from andrewlkho/gist:e9a8c996c4bc1df23cd2
How to secure debian with two factor authentication (TOTP/HOTP)

First, install the necesssary packages:

% apt-get install libpam-oath oathtool

Generate a key and write it to /etc/users.oath (NB the key will be in hexadecimal; if you are using Authy you will want to convert it to BASE32):

% KEY=$( head -c 1024 /dev/urandom | openssl sha1 | awk '{ print $2 }' )
% echo "HOTP/T30/6 andrewlkho - ${KEY}" >> /etc/security/users.oath
% chmod 600 /etc/users.oath
@daryltucker
daryltucker / glados.sh
Created August 11, 2019 01:38 — forked from ArtBIT/glados.sh
GLaDOS eSpeak
random_pitch() {
local delta=${1:-50}
local value=$(( ($RANDOM % $delta) - $delta/2 ))
echo "+${value}" | sed 's/+-/-/'
}
glados() {
local pitch=70
local speed=180
local lang=en
alert();
@daryltucker
daryltucker / README.md
Created October 29, 2015 19:26 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default and default-ssl to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/