Skip to content

Instantly share code, notes, and snippets.

View djblue's full-sized avatar

Chris Badahdah djblue

View GitHub Profile
@djblue
djblue / install.sh
Created December 8, 2014 06:40
setup vbox on guest archy
#!/bin/sh
# quickly setup a guest virtualbox on arch linux
# should at least get you shared folders
pacupg # upgrade all current packages
# install guest additions
pacin virtualbox-guest-modules virtualbox-guest-utils
@djblue
djblue / nginx.conf
Created December 8, 2014 04:35
Setup an nginx reverse proxy with ssl.
server {
server_name: you.domain;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
proxy_set_header Host $host;
@djblue
djblue / ssl.md
Last active August 29, 2015 14:10
nginx ssl

self signed ssl certificates

When setting up a development server that will be accessible over the internet, it is a good idea to use ssl.

Below are some snippets for setting up self signed certificates:

sudo openssl req -x509 -nodes -days 365 \
                 -newkey rsa:2048 \
 -keyout /etc/nginx/ssl/nginx.key \
@djblue
djblue / snippets.sh
Created November 7, 2014 04:25
A collection of bash snippets.
# Sum all of the columns in a table
cat file.txt | cut -d',' -f2 | paste -sd+ | bc
@djblue
djblue / keybase.md
Last active August 29, 2015 14:08
keybase.md

Keybase proof

I hereby claim:

  • I am djblue on github.
  • I am djblue (https://keybase.io/djblue) on keybase.
  • I have a public key whose fingerprint is 7FCB 6D86 C6C5 8A17 F757 3A82 EE96 F634 BE27 9099

To claim this, I am signing this object:

@djblue
djblue / ssh.md
Last active August 29, 2015 14:06
reverse ssh is awesome

reverse ssh

Setup a reverse ssh tunnel to a remote machine:

ssh -fN -R 2222:localhost:22 user@server

Connect to tunnel after logging on to the remote machine:

ssh user@server
ssh user@localhost -p 2222