Skip to content

Instantly share code, notes, and snippets.

@shsu
shsu / camphor.scss
Created December 4, 2017 02:49 — forked from bdno86/camphor.scss
camphor
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE
#!/usr/bin/env bash
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg|apt-key add -
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt-get update && apt-get install -y openvpn
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
echo "Done!"
### Keybase proof
I hereby claim:
* I am shsu on github.
* I am shsu (https://keybase.io/shsu) on keybase.
* I have a public key whose fingerprint is 71FB E785 BCC3 8999 B287 B090 C1B9 2EF2 1B3B AC54
To claim this, I am signing this object:
@shsu
shsu / Logspout-Usage.md
Last active June 3, 2016 18:06
Logspout Usage

Logspout Usage

Papertrail (TLS)

Use logspout to stream your docker logs to Papertrail.

$ docker run --name logspout-papertrail --restart=always -d \
    --volume=/var/run/docker.sock:/var/run/docker.sock \
    edvisor/logspout-papertrail \
    syslog+tls://<ENDPOINT>.papertrailapp.com:<PORT>
@shsu
shsu / wp-config.php
Last active May 9, 2016 05:01
wp-config.php cloudflare reverse proxy
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$_SERVER['HTTPS']='on';
}
define('FORCE_SSL_ADMIN', true);
#!/usr/bin/env bash
# https://rtcamp.com/easyengine/docs/chroot-sftp-easyengine/
if [ "$#" -ne 2 ]; then
echo "Usage: <command> <user> <site-name>"
exit 1
fi
sudo adduser --shell /bin/false --ingroup www-data $1
@shsu
shsu / permissions.sh
Created May 17, 2015 18:06
Set Webfaction Permissions
#!/bin/bash
if [ $# -lt 2 ]; then
echo 'Too few arguments.\n'
echo 'USAGE: permissions.sh action username app_name'
echo 'eg: permissions.sh grant joe django'
echo 'actions: grant, revoke-app, revoke-all'
exit
fi
#!/bin/sh
# update repositories
apt-get update
# download the necessary prerequisite components for mineos
apt-get -y install screen python-cherrypy3 rdiff-backup git openjdk-7-jre-headless
# download the most recent mineos web-ui files from github
mkdir -p /usr/games
@shsu
shsu / xml-party.rb
Last active August 29, 2015 14:10 — forked from dentarg/xml-party.rb
KeePass 2.x XML to 1Password CSV
require 'csv'
require 'open-uri'
require 'nokogiri'
file = "keepass.xml"
doc = Nokogiri::XML::Document.parse(open(file)) do |config|
config.noblanks
end ; nil
function substitute {
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..."
echo
echo "Replace all occurances of FROM_STRING (a sed-compatible regular"
echo "expression) with TO_STRING in all files for which ack-grep matches"
echo "FROM_STRING."
echo
echo "Any additional options are passed directly to ack-grep (e.g.,"
echo " --type=html would only run the substitution on html files)."