Feel free to run via...
npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64
| location ~ ^(.*)\/wp-content\/uploads\/(.*)$ { | |
| try_files $uri @missing; | |
| } | |
| location @missing { | |
| rewrite "^(.*)/wp-content/uploads/(.*)$" "http://production-url.com$1/wp-content/uploads/$2" redirect; | |
| } |
| # This is a general-purpose function to ask Yes/No questions in Bash, either | |
| # with or without a default answer. It keeps repeating the question until it | |
| # gets a valid answer. | |
| ask() { | |
| # https://gist.github.com/davejamesmiller/1965569 | |
| local prompt default reply | |
| if [ "${2:-}" = "Y" ]; then | |
| prompt="Y/n" |
Feel free to run via...
npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64
| /* | |
| This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
| It will generate several classes such as: | |
| .m-r-10 which gives margin-right 10 pixels. | |
| .m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
| .m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
| .p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
| .p-l-40 gives PADDING to the LEFT of 40 pixels |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {| # Install the hostsupdater: | |
| # vagrant plugin install vagrant-hostsupdater | |
| # Place the following code into $HOMESTEAD/scripts/homestead.rb | |
| # I placed it somewhere near end of the file | |
| # Add the aliases to the host machine | |
| if Vagrant.has_plugin?('vagrant-hostsupdater') | |
| aliases = Array.new | |
| settings["sites"].each do |site| |
| // For IE 9 and lower, load a conditional stylesheet: | |
| // <!--[if IE]> | |
| // <link rel="stylesheet" type="text/css" href="ie.css" /> | |
| // <![endif]--> | |
| // IE 10 and up doesn't support this, so you have to use media queries: | |
| @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
| /* IE10+ CSS */ |
| $total-columns: 6; | |
| $col-widths: (); | |
| @for $i from 1 through $total-columns { | |
| @for $j from 1 through $i { | |
| $w: ($j/$i); | |
| @if not index($col-widths, $w) { | |
| .col-#{$j}-#{$i} { | |
| width: $w * 100%; |
| [config] | |
| command = bash deploy.sh |
| #!/bin/bash | |
| DIR="/my-site" | |
| REPO="git@github.com:username/repository.git" | |
| BRANCH="master" | |
| CHECKOUT_DIR="source/" | |
| mkdir -p $DIR | |
| if [ -d "$DIR" ]; then | |
| cd $DIR |