Skip to content

Instantly share code, notes, and snippets.

View stringsn88keys's full-sized avatar

Thomas Powell stringsn88keys

View GitHub Profile
@stringsn88keys
stringsn88keys / letsencrypt.sh
Created July 3, 2017 17:04
get certs via lets encrypt
#first time setup only
sudo apt-get install git
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
# I had to restart apache with a stubbed *.443 section, do this, and then
# add the SSL* directives in.
sudo -H ./letsencrypt-auto certonly --standalone -d example.com
@stringsn88keys
stringsn88keys / example.com-new.conf
Last active July 3, 2017 17:05
Final apache conf
<Directory /var/www/html/example.com/public_html>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect / https://example.com/
</VirtualHost>
<VirtualHost *:443>
SSLEngine On
@stringsn88keys
stringsn88keys / wp-config-new.fake.snippet.php
Created July 3, 2017 16:46
Another fake wp-config snippet
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wp_example_com');
/** MySQL database username */
define('DB_USER', 'examplecom');
/** MySQL database password */
define('DB_PASSWORD', '!@(87P@ss');
<Directory /var/www/html/example.com/public_html>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin email@example.com
DocumentRoot /var/www/html/example.com/public_html
@stringsn88keys
stringsn88keys / apache2.conf
Created July 3, 2017 16:22
Apache2 conf snippet
<Directory /var/www/html/example.com/public_html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@stringsn88keys
stringsn88keys / mysqldump command
Last active July 3, 2017 15:39
Mysqldump example for extracting wordpress
mysqldump wp_example_com --host mysql.db.example.com -u examplecom -p > example.com.sql
@stringsn88keys
stringsn88keys / wp-config.fake.snippet.php
Last active July 3, 2017 15:33
Fake wp-config snippet for instructions on moving from Dreamhost to Linode
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wp_example_com');
/** MySQL database username */
define('DB_USER', 'examplecom');
/** MySQL database password */
define('DB_PASSWORD', 'ASD9@!h12');
@stringsn88keys
stringsn88keys / init.lua
Last active July 20, 2021 17:13
Hammerspoon init script to auto-arrange for three screens.
-- https://en.wikipedia.org/wiki/Web_colors#X11_color_names
-- hs.streamdeck.init(function(connected, sd)
-- device = hs.streamdeck.getDevice(1)
-- device.setButtonColor("1", hs.drawing.color.x11.teal)
-- end)
applications = { "Messages", "iTunes", "Skype for Business", "iTerm2", "Microsoft Outlook", "HipChat", "Microsoft OneNote", "MacVim", "RubyMine", "Firefox" }
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "pageup", function()
@stringsn88keys
stringsn88keys / init.lua
Created April 1, 2017 00:02
Hammerspoon init script that allows 1-9 to move windows into 9ths of the screen
function move_to_third(r,c)
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local extents = screen:frame()
f.x = extents.x + (extents.w / 3) * c
f.y = extents.y + (extents.h / 3) * r
f.w = extents.w / 3
f.h = extents.h / 3
@stringsn88keys
stringsn88keys / .zlogin
Last active October 20, 2021 21:29
A section of my .zlogin to notify me when a process > 4 minutes finishes. (Mac-specific)
export PMPSVN='http://cvs.appriss.com/svn/softeng/projects/pmp'
export PATH=~/bin:$PATH
export DYLD_LIBRARY_PATH=~/instantclient_11_2
#alias gvim='mvim'
export EDITOR=/usr/local/bin/mvim
export NARWHAL_ENGINE=jsc
export RSENSE_HOME=~/.vim/bundle/rsense
export PATH="/Library/PostgreSQL/9.2/bin:/usr/local/narwhal/bin:$PATH"