This is a javascript bookmarklet that toggles your current domain between a product and local development URL.
For example:
https://example.com/some/path?key=value
Becomes:
http://example.dev/some/path?key=value
# Assumes the database container is named 'db' | |
DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
DB_HOSTNAME=db | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="path/to/local.dump" | |
docker-compose up -d db | |
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop db |
; This is the PlexPy config.ini file. | |
; Just the two lines needed for the reverse proxy, the rest of the file doesn't | |
; need to be touched | |
http_root = /plexpy | |
http_proxy = 1 |
If this is hard to read in your browser, just copy the text and paste it into your editor. | |
Turn 'line wrapping' on. :) | |
This is a 'how to' for anyone interested in a i3 setup and also for anyone currently | |
using i3 and wants to tweak there setup a little more. I am constantly updating my | |
i3 config with cool 'stuff.' I hope you enjoy reading and if you use some of the code, | |
great! I don't know everything and am still learning, too. :) | |
This is my system settings for i3. Specifically, I use [Manjaro i3](https://forum.manjaro.org/index.php?topic=28022.0). |
// Depends on ECMAScript 6 for the `map` and `reduce` functions. They are | |
// easily replaced with a library like Lodash or Underscore. | |
var FedExChecker = (function() { | |
'use strict'; | |
var CHECK_WEIGHT_ARRAY, TRACKING_NUMBER_MAX_LENGTH, digitsToArray; | |
function FedExChecker() {} |
/** | |
* The difference between max-width 100% and width 100% | |
*/ | |
.maxwidth { | |
max-width: 100%; | |
} | |
.width { | |
width: 100%; |
#!/bin/bash | |
# A quick and dirty shell script to turn on the Lightpack, launch Plex, then | |
# turn off the Lightpack when Plex exits. | |
# Turn on Lightpack | |
(sleep 1; echo "lock"; echo "setstatus:on"; sleep 1; echo "exit") \ | |
| telnet 127.0.0.1 3636; | |
# Launch Plex Home Theater, and turn off Lightpack on exit |
#!/bin/sh | |
# | |
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files | |
# for Pry binding references | |
# | |
# Installation | |
# | |
# cd .git/hooks | |
# ln -s relative/path/to/pre-commit.sh | |
# |
/** | |
* Pseudo-skewed box | |
*/ | |
html { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
padding: 8em; | |
} |
// Choose what browser prefixes you want based on info you find here: | |
// http://caniuse.com/#feat=css-animation | |
// Add vendor prefixes to keyframes | |
@mixin keyframes($animation-name) | |
@-webkit-keyframes #{$animation-name} | |
@content | |
@-moz-keyframes #{$animation-name} | |
@content | |
@keyframes #{$animation-name} |