This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"animation_enabled": false, | |
"auto_complete_selector": "source, text", | |
"caret_extra_bottom": 3, | |
"caret_extra_top": 3, | |
"caret_extra_width": 2, | |
"color_scheme": "Packages/ayu/ayu-mirage.tmTheme", | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Regenerate missing image sizes only. | |
* | |
* Note: Untested code | |
*/ | |
function regenerate($image_size = '', $attachment_id = []) { | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AdvancedNewFile", | |
"Auto Semi-Colon", | |
"ayu", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a custom [build system](http://bit.ly/17IKkU9) to provide PHP syntax checking. | |
* Save this file as ~/.config/sublime-text-2/Packages/User/PHP.sublime-build | |
* | |
* Usage | |
* - In the editor, select a tab with PHP source code. | |
* - Press F7 or CTRL + B to run PHP syntax check. | |
* - The status will be be displayed in the console at the bottom. | |
* - If it shows error, press F4, and the editor cursor will be brought to the relevant line in the source code. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* \.(png|jpe?g|gif|ico)$ { | |
alias /path/to/public_html/; | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
proxy_pass http://<staging_url>.com/$uri; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
CURRENT_DIR=${PWD} | |
NAME="$(basename $CURRENT_DIR)" | |
DOCROOT=$(drush dd) | |
FILEPATH=$(realpath --relative-to="$DOCROOT" "$CURRENT_DIR") | |
drush potx --api=8 --folder=$FILEPATH/* | |
mkdir -p ./translations | |
mv $DOCROOT/general.pot ./translations/$NAME.pot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install xcode CLI | |
echo "Installing xcode-stuff" | |
xcode-select --install | |
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." |