Skip to content

Instantly share code, notes, and snippets.

@badsyntax
badsyntax / add.png
Last active May 29, 2023 15:45
Adding Namecheap glue and nameserver records for a mailinabox server
add.png
@badsyntax
badsyntax / crontab
Created February 29, 2016 08:44
pflogsumm rocks
@daily /usr/sbin/pflogsumm -d yesterday --problems /var/log/mail.log | mail -s "Mail Server: Yesterday's mail activity" [email protected]
@badsyntax
badsyntax / example.sh
Created December 18, 2015 23:30
Install and Enable the LXD REST API in Ubuntu 14.04
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
sudo apt-get update
sudo apt-get install -y lxd
sudo newgrp lxd
sudo lxc config set core.https_address 127.0.0.1
sudo lxc config trust add $HOME/.config/lxc/client.crt
@badsyntax
badsyntax / nagios.domain.com.conf
Created October 20, 2015 22:01
Working nagios3 nginx virtual host file for Ubuntu 14.04.3
server {
listen 80;
server_name nagios.domain.com;
access_log /var/log/nginx/nagios.access.log;
error_log /var/log/nginx/nagios.error.log info;
expires 31d;
root /usr/share/nagios3/htdocs;
@badsyntax
badsyntax / example.bash
Last active December 15, 2016 10:57
SSHFS usage on OSX
# Mount
sshfs [email protected]: local_dir/ -o uid=$(id -u) -o gid=$(id -g)
# Unmount
sudo umount -f local_dir/
@badsyntax
badsyntax / .bash_profile
Created September 3, 2015 08:34
Latest dotfiles for OSX
alias ls="ls -G"
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias serve="~/Scripts/serve"
alias serve80="sudo ~/Scripts/serve 80"
alias t="echo $0"
alias gitlogall="git log --graph --decorate --pretty=oneline --abbrev-commit --all"
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
source ~/Scripts/git-completion.bash
@badsyntax
badsyntax / overview.md
Last active August 29, 2015 14:27
Getting started with screen
  • type screen
  • Ctrl a A to rename session
  • Ctrl a c to create new session
  • Ctrl a Ctrl a to switch sessions
  • Ctrl a d to exit (detach) screen
  • screen -ls to list sessions
  • screen -r to reattach
  • screen -D -r to reattach if exited session without detaching (connected dropped for example)
@badsyntax
badsyntax / dubstep.json
Created July 31, 2015 22:38
My favourite dubstep tunes from back in the day.
[
{ "id": "TI7ajCiDcpU", "title": "Starky - Gutter Music" },
{ "id": "9bbH1vTTEUY", "title": "Skism - The Blank (16 Bit Remix)" },
{ "id": "1acPYhOpUoU", "title": "Datsik - Retreat" },
{ "id": "bo8I55AbcP4", "title": "Propa Tinz - Bablylon\"s Scared (16 Bit Remix)" },
{ "id": "rr5gCKmgR0w", "title": "Akira Kiteshi - Pinball" },
{ "id": "zx4G5qc_R7g", "title": "Bar 9 - Murda Sound" },
{ "id": "FzTF_-fSTSw", "title": "Cookie Monsta - Antichrist" },
{ "id": "IEWJ32ZF2i0", "title": "Koan Soan - Blessed" },
{ "id": "wML1qxCMxXg", "title": "Physical - Mario Dub" },
@badsyntax
badsyntax / provision.sh
Last active March 30, 2016 23:11
Running lxc with zfs backing store, in Ubuntu 14.04, within a virtualbox virtual machine
#!/usr/bin/env bash
# ubuntu/trusty64
apt-get update
apt-get install software-properties-common -y
apt-add-repository ppa:ubuntu-lxc/daily
add-apt-repository ppa:zfs-native/stable
add-apt-repository ppa:nginx/stable -y
@badsyntax
badsyntax / .bash_profile
Last active August 29, 2015 14:26
My latest dotfiles on osx
#!/usr/bin/env bash
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias serve="python -m SimpleHTTPServer"
alias serve80="sudo python -m SimpleHTTPServer 80"
alias ls='ls -G'
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash