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/sh | |
# Mac: Unlock everything | |
sudo chflags -R nouchg . | |
# Mac: Delete all .DS_Store | |
find . -name ".DS_Store" -print -exec rm {} ";" | |
# DW: Delete all /_notes/ | |
find . -name "_notes" -print -exec rm -r {} ";" |
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
defaults write com.apple.screencapture name "" |
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
//To enable textcopy on QuickLook | |
$ defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder | |
//To reset above | |
$ defaults delete com.apple.finder QLEnableTextSelection; killall Finder |
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
function my_post_types() { | |
// Set labels | |
$labels = array( | |
'name' => 'Questions', | |
'singular_name' => 'Question', | |
'add_new' => 'Add New Question', | |
'add_new_item' => 'Add New Question', | |
'edit_item' => 'Edit Question', | |
'new_item' => 'New Question', | |
'all_items' => 'All Questions', |
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
/* remove more-anchor from read more link */ | |
function remove_more_jump_link($link) { | |
$offset = strpos($link, '#more-'); | |
if ($offset) { | |
$end = strpos($link, '"',$offset); | |
} | |
if ($end) { | |
$link = substr_replace($link, '', $offset, $end-$offset); | |
} | |
return $link; |
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
function strip_width_height_html( $html ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); | |
return $html; | |
} | |
add_filter ( 'post_thumbnail_html', 'strip_width_height_html'); |
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
//Not to show h1 on Tiny MCE | |
function custom_editor_settings( $initArray ){ | |
$initArray['theme_advanced_blockformats'] = 'p,address,pre,code,h2,h3,h4,h5,h6'; | |
return $initArray; | |
} | |
add_filter( 'tiny_mce_before_init', 'custom_editor_settings' ); |
NewerOlder