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 | |
# usage: ORIG=###### NEW=###### ./gistmerge.sh | |
# $ORIG = The Gist ID of your Gist | |
# $NEW = The Gist ID of the fork | |
# Note: chmod u+x gistmerge.sh may be necessary | |
# if you're getting permissions errors | |
printf "\n\n... Cloning original Gist.\n\n" |
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 | |
// fancy PHP 5.3+ style | |
add_action( 'template_redirect', function() { | |
if ( ! is_user_logged_in() ) { | |
wp_redirect( wp_login_url() ); | |
exit; | |
} | |
} ); |