Skip to content

Instantly share code, notes, and snippets.

Working from home

Dan Ackerson danackerson

Working from home
View GitHub Profile
View gist:010d3324f91119b599433638555294a5
$ vi .ssh/
wakeonlan 2c:f0:5d:5e:84:43
while [ $(nmap "$1" -PN -6 -p ssh | grep -E 'open|closed|filtered' | awk '{print $2}') == "closed" ]
echo "ssh not available..."
sleep 3
nc "$1" "$2"
View .bash_profile
### GIT ###
alias gs='git status'
alias gd='git diff'
alias gc='git commit -am'
alias gp='git push'
### K8S ###
alias k='sudo kubectl'
alias kp='k get po'
alias kap='k get pods --all-namespaces -o wide'
danackerson /
Created Oct 18, 2020
custom leftupdown IPSec script
# default updown script
# Copyright (C) 2003-2004 Nigel Meteringham
# Copyright (C) 2003-2004 Tuomo Soini
# Copyright (C) 2002-2004 Michael Richardson
# Copyright (C) 2005-2007 Andreas Steffen <>
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
View conky.config
conky.config = {
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
override_utf8_locale = true,
double_buffer = true,
no_buffers = true,
text_buffer_size = 32768,
imlib_cache_size = 0,
danackerson / import LetsEncrypt pfx file for Windows Remote Desktop use
Last active Sep 23, 2020
Create PFX file for importing into Windows and use for Remote Desktop access
View import LetsEncrypt pfx file for Windows Remote Desktop use
# On ubuntu@pi:
cd traefik
./traefik-certs-dumper file --version v2
cat dump/private/\* > ackerson.pem
cat dump/certs/\* >> ackerson.pem
openssl pkcs12 -export -out ackerson.pfx -in ackerson.pem
# On Windows10 in an Administrator Powershell Terminal:
scp ubuntu@pi:~/traefik/ackerson.pfx .
certutil -p xyz123 -importPFX ackerson.pfx noExport

Keybase proof

I hereby claim:

  • I am danackerson on github.
  • I am danackerson ( on keybase.
  • I have a public key whose fingerprint is 5C30 3788 8012 568A E9F4 6C23 1B77 1D85 60C2 CCA0

To claim this, I am signing this object:

View perfectSquares.go
package main
import (
// change prime() to main() for execution => can't have 2 main()'s and go test
func main(){
index := 0
danackerson / 100_base.conf
Last active Apr 4, 2022
using nginx + lua + redis for redirects and rewrites
View 100_base.conf
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
View apache basic auth with ip addresses
Order deny,allow
Deny from all
AuthType Basic
AuthUserFile /etc/apache2/passwd/.htpasswd
Require valid-user
Allow from 192.168
Satisfy Any