Skip to content

Instantly share code, notes, and snippets.

View mmangione's full-sized avatar

Micah Mangione mmangione

View GitHub Profile
@mmangione
mmangione / README.md
Created July 22, 2016 05:53 — forked from josephholsten/README.md
The Most Boring nginx.conf

The Most Boring nginx.conf

These configs describe the way your default nginx proxy ought to be configured. Because you almost certainly want:

  • standard HTTPS -> HTTP proxy caching, using conditional GETs
  • to upgrade all HTTP connections to HTTPS
  • to follow Mozilla's TLS recomendations
  • SPDY support if the client supports it
  • to support proxying WebSockets
  • to provide X-Real-IP, X-Forwarded-For & X-Forwarded-Proto
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
@mmangione
mmangione / create_user.sh
Created April 25, 2017 22:43 — forked from divyavanmahajan/create_user.sh
Turnkey OpenVPN - Add new users. It creates two OVPN files - with and without proxy and also generates the URLs to download them. Safely use for existing users - it just creates the OVPN files.
#!/bin/bash -e
fatal() { echo "FATAL: $@" 1>&2; exit 1; }
warn() { echo "WARN: $@"; }
info() { echo "INFO: $@"; }
usage() {
cat <<EOF
Usage: sudo $0 client_or_profile_name
This will create two ovpn files in this directory (proxy and noproxy).
cd /var/www
mv redmine redmine-old
hg clone --updaterev 3.4-stable https://bitbucket.org/redmine/redmine-all redmine
cp redmine-old/config/configuration.yml redmine/config/configuration.yml
cp redmine-old/config/database.yml redmine/config/database.yml
cp -r redmine-old/files/ redmine/files/
chown -R root:www-data /var/www/redmine
cd redmine
gem install bundler
gem install test-unit
@mmangione
mmangione / hashcat_help.txt
Created October 23, 2019 05:34 — forked from BeanBagKing/hashcat_help.txt
Hashcat Help Documentation
hashcat64.exe -a 0 -w 0 -m 1000 -r rules/lmNTLM.rule hashes/ntlm.txt lists/lab.txt
hashcat64.exe -a 0 -w 1 -m 1800 hashes/unixmd5.txt lists/rockyou.txt
hashcat64.exe -a 3 -w 1 -m 1800 --increment ?a?a?a?a?a hashes/unixmd5.txt
C:\hashcat-3.10>hashcat64.exe -h
hashcat, advanced password recovery
Usage: hashcat [options]... hash|hashfile|hccapfile [dictionary|mask|directory]...
@mmangione
mmangione / hashcat_help.txt
Created October 23, 2019 05:34 — forked from BeanBagKing/hashcat_help.txt
Hashcat Help Documentation
hashcat64.exe -a 0 -w 0 -m 1000 -r rules/lmNTLM.rule hashes/ntlm.txt lists/lab.txt
hashcat64.exe -a 0 -w 1 -m 1800 hashes/unixmd5.txt lists/rockyou.txt
hashcat64.exe -a 3 -w 1 -m 1800 --increment ?a?a?a?a?a hashes/unixmd5.txt
C:\hashcat-3.10>hashcat64.exe -h
hashcat, advanced password recovery
Usage: hashcat [options]... hash|hashfile|hccapfile [dictionary|mask|directory]...
@mmangione
mmangione / install-gpu.sh
Created July 4, 2020 22:35 — forked from huwan/install-gpu.sh
Install NVIDIA driver and CUDA toolkit (Ubuntu 18.04 + CUDA 10.0)
#! /bin/bash
# from https://www.tensorflow.org/install/gpu
# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
@mmangione
mmangione / haproxy.cfg
Created August 1, 2020 06:08 — forked from lackac/haproxy.cfg
HAProxy configuration with Websocket support
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
log 127.0.0.1 local1 notice
defaults
mode http
log global
frontend all 0.0.0.0:80