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 | |
## How long to delay the start of Dropbox | |
DELAY=$1 | |
## If no delay is set default to 10 seconds | |
: ${DELAY:=10} | |
## If dropbox exists then start it | |
if type "dropbox" > /dev/null; then | |
echo "Starting Dropbox in ${DELAY} seconds..." |
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
#sites, | |
#folder { | |
font-family: "Ubuntu Mono",monospace; | |
} | |
.site-title-text { | |
font-weight:400!important; | |
} | |
#folder { | |
padding: 1em 0 3em; |
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
find . -name "*.php" -print | xargs sed -i 's/apple/orange/g' |
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 | |
// clean_url can be used in versions prior to 4.1 | |
add_filter( 'clean_url', function( $url ) { | |
if( is_admin() ) { | |
return $url; | |
} | |
if ( FALSE === strpos( $url, '.js' ) ) { | |
return $url; |
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 | |
/* | |
Plugin Name: Do Automatic Updates | |
Plugin URI: | |
Description: Do automatic updates on everything; themes, plugins, translations and core (both minor and major updates). | |
Author: Anna Johansson | |
Version: 1 | |
Author URI: http://annalinneajohansson.com | |
*/ |
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 | |
function hip_filter_auto_update_email( $email ) { | |
$email['to'] = '[email protected]'; | |
return $email; | |
} | |
add_filter( 'auto_core_update_email', 'hip_filter_auto_update_email', 1 ); |
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 | |
define( 'MENU_SLUG', 'pinboard-hearts-wp' ); | |
add_action( 'admin_menu', 'pinbheartswp_admin_menu', 10 ); | |
function pinbheartswp_admin_menu() { | |
/* | |
add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function); | |
*/ | |
add_options_page( __('Pinboard ♥ WordPress Options', 'pinbheartswp' ), __('Pinboard ♥ WP', 'pinbheartswp' ), 'manage_options', MENU_SLUG, 'pinboard_hearts_wordpress_options' ); | |
} |
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 | |
for i in * ; do mv $i `echo $i | tr [A-Z] [a-z]` ; done |
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 | |
desktops=$(wmctrl -d | awk '{ print $2":"$10 }') | |
for desktop in $desktops | |
do | |
# example output of $desktop: -Work or *Leisure | |
if [[ $(echo $desktop | cut -c1-1) = '*' ]]; then | |
echo $desktop | cut -c3- | |
fi | |
done |