Skip to content

Instantly share code, notes, and snippets.

View seanwash's full-sized avatar
🏠
Working from home

Sean Washington seanwash

🏠
Working from home
View GitHub Profile
@seanwash
seanwash / sgFixThatIsh.js
Created January 20, 2012 17:33 — forked from seangaffney/sgFixThatIsh.js
jQuery: Fix That Ish - A plugin for fixing things (one thing in particular) in the browser window. No support for IE8 and below.
/*
* jQuery sgFixThatIsh v0.1 :)
* http://seangaffney.cc
* Copyright 2012, Sean Gaffney
*/
(function( $ ){
var opts = { bottomPadding: 8 };
var $header, $content, $win;
var contWidth, currentContWidth, headHeight, headWidth,
@seanwash
seanwash / install-comodo-ssl-cert-for-nginx.rst
Last active August 29, 2015 14:27 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@seanwash
seanwash / px-rem-cheat-sheet.css
Created September 25, 2015 22:20 — forked from glueckpress/px-rem-cheat-sheet.css
Cheat sheet for rem-calculations based upon 14px and 16px.
/*! = $rembase: 14px
--------------------------------------------------------------
* hmtl { font-size: 87.5%; }
* body { font-size: 14px; font-size: 1rem; line-height: 1; }
* 4px 0.28571429rem
* 8px 0.571428571rem
* 12px 0.857142857rem
* 13px 0.928571429rem
* 14px 1rem
* 16px 1.142857143rem

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@seanwash
seanwash / db.rake
Created April 8, 2016 14:28 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@seanwash
seanwash / node.sh
Created August 16, 2016 15:03 — forked from adamcbrewer/node.sh
NODE: Run a daemon node.js server and create virtualhost to forward all site traffic to the specified port.
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
@seanwash
seanwash / DiabloIII.ahk
Created January 3, 2019 04:30 — forked from NixonInnes/DiabloIII.ahk
Diablo III Autocast Autohotkey Script
; This is an AutoHotKey script designed to be used with Diablo III
; Pressing F1 will constantly activate skill 1, F2 will activate skill 2, F3 for 3, and F4 for 4
; The keys are togglable.
Thread, interrupt, 0
togF1 := 0
$F1::
togF1 := !togF1
if (togF1) {
@seanwash
seanwash / post.md
Created August 11, 2019 22:35 — forked from LostKobrakai/post.md
Using Laravel-Mix with Phoenix

Introduction

Laravel-Mix is "an elegant wrapper around Webpack for the 80% use case". It has nothing to do with Elixir's Mix and does not require Laravel to work!

Set up

Create a new phoenix application with mix phx.new. You may choose to add the --no-brunch flag to stop brunch from being intiailized, but I personally prefer leaving that in and replacing brunch so that the folder structure is set up for me.

$ mix phx.new demo

Install Laravel-Mix