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
dropBox := (FileLocator home / 'Dropbox/source_folder'). | |
dbFiles := dropBox allFiles reject: [ :e | e basename = '.DS_Store' ]. | |
targetFolder := '/path/to/target' asFileReference. | |
targetFiles := targetFolder allFiles reject: [ :e | e basename = '.DS_Store' ]. | |
[ :job | | |
(targetFiles last: (targetFiles size - 1369)) do: [ :tf | | |
| suffix matches | | |
suffix := tf basename copyAfterLast: $_. | |
matches := dbFiles select: [ :sf | | |
| currentSuffix | |
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
.password | |
Downloads/ |
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 myplugin_settings() { | |
// Add tag metabox to page | |
register_taxonomy_for_object_type('post_tag', 'page'); | |
// Add category metabox to page | |
register_taxonomy_for_object_type('category', 'page'); | |
} | |
// Add to the admin_init hook of your theme functions.php file | |
add_action( 'init', 'myplugin_settings' ); | |
//Remove admin bar (From http://www.instantshift.com/2012/03/06/21-most-useful-wordpress-admin-page-hacks/) |
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
TestCase subclass: #TitleBodySlideMorphTest | |
instanceVariableNames: '' | |
classVariableNames: '' | |
poolDictionaries: '' | |
category: 'Morphic-Slideshow'! | |
!TitleBodySlideMorphTest methodsFor: 'testing' stamp: 'sd 7/31/2004 10:17'! | |
testMarkedElements | |
"self run: #testMarkedElements" | |
"self debug: #testMarkedElements" |
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
// Add to functions.php to disable tag stripping from visual editor | |
// From http://wordpress.stackexchange.com/questions/52582/how-to-disable-tinymce-from-removing-span-tags | |
function override_mce_options($initArray) { | |
$opts = '*[*]'; | |
$initArray['valid_elements'] = $opts; | |
$initArray['extended_valid_elements'] = $opts; | |
return $initArray; | |
} | |
add_filter('tiny_mce_before_init', 'override_mce_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
ffmpeg -i input.mp4 -f mp4 -vcodec libx264 output.mp4 |
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
tell application "Photos" | |
set mem to item 2 of containers | |
get filename of media items of mem | |
--get container whose name is "Album Name" | |
end tell |
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
apt-get update | |
apt-get upgrade | |
# restart | |
# I've seen the removals all in one command, but it didn't seem to work for me | |
sudo apt-get remove dkms | |
sudo apt-get remove build-essential | |
sudo apt-get removelinux-headers-* |
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
# From http://apple.stackexchange.com/a/66891/9507 | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f /Applications/Open\ with\ Vim.app/ | |
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
# Tested in 14.04 | |
# There are a few other alternatives if this stops working. | |
# References: | |
# - https://askubuntu.com/questions/286297/is-there-a-work-around-to-get-protected-hulu-or-amazon-prime-instant-videos-work?rq=1 | |
# - http://www.amazon.com/forum/amazon%20video%20on%20demand?_encoding=UTF8&cdForum=Fx3EQAX98ED5WQ3&cdMessage=Mx1OECWP0PM505W&cdPage=2&cdSort=newest&cdThread=TxFTGOK5LRL3JM | |
# - http://www.howtogeek.com/204319/how-to-watch-amazon-instant-video-on-linux/?PageSpeed=noscript | |
# - https://askubuntu.com/questions/362259/how-to-watch-videos-in-amazon-prime-instant-video | |
sudo add-apt-repository ppa:mjblenner/ppa-hal | |
sudo apt-get update | |
sudo apt-get install hal |