The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| <?php | |
| // Put this in wp-config.php and replace https://example.com/ with the URL of the production site. | |
| define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' ); | |
| // Put the rest of this in functions.php or a custom plugin or somewhere else. | |
| if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) { | |
| add_filter( 'wp_get_attachment_image_src', array( $this, 'filter_wp_get_attachment_image_src' ) ); | |
| add_filter( 'wp_calculate_image_srcset', array( $this, 'filter_wp_calculate_image_srcset' ) ); | |
| add_filter( 'wp_get_attachment_url', array( $this, 'filter_wp_get_attachment_url' ) ); | |
| } |
| #!/usr/bin/env bash | |
| get_hosts="cat ~/.ssh/config | grep Host\\\\s | awk '{ print \$2 }' | sort -u" | |
| if [[ $# -eq 0 ]] ; then | |
| eval "$get_hosts | nl -ba" | |
| exit; | |
| fi | |
| host_num=$1 |
| for i in $(git status -s | grep '^\s*A\|^\s*M' | sed -e 's/^.* //'); do php -l $i; done |