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
// Inspiration: | |
// https://forums.adobe.com/message/2524327 | |
// http://www.indiscripts.com/post/2009/10/work-around-the-width-height-gap | |
var myDoc = app.activeDocument; | |
function getWidth(/*PageItem*/obj, /*bool*/visible) | |
// return the [width,height] of <obj> | |
// according to its (geometric|visible)Bounds | |
{ |
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
// Based on https://forums.adobe.com/thread/578555 | |
var myDoc=app.activeDocument; | |
tableList = myDoc.textFrames.everyItem().tables.everyItem(); | |
tableList.convertToText("\t","\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
//Based on http://wwwimages.adobe.com/content/dam/Adobe/en/products/indesign/pdfs/InDesignCS5_ScriptingGuide_JS.pdf | |
var myDocument = app.activeDocument; | |
//Clear the find/change text preferences. | |
app.findTextPreferences = NothingEnum.nothing; | |
app.changeTextPreferences = NothingEnum.nothing; | |
//Set the find options. | |
app.findChangeTextOptions.caseSensitive = false; | |
app.findChangeTextOptions.includeFootnotes = false; | |
app.findChangeTextOptions.includeHiddenLayers = false; | |
app.findChangeTextOptions.includeLockedLayersForFind = false; |
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
a="[email protected], [email protected]" | |
mutt -s "subject" -a file.pdf -- $a |
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 start stopwatch: | |
time cat | |
# To stop stopwatch: | |
ctrl+c |
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
sudo find /path/to/search/ -size +15M -printf "%s - %p\n" | sort -n | tail |
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
ls -RlhS | |
# -R: recursive | |
# -l: long listing | |
# -h: human readable file sizes | |
# -S: sort by file size |
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
# Source: http://www.unixtutorial.org/2008/06/how-to-compare-directories-in-unix/ | |
diff --recursive --brief /tmp/dir1 /tmp/dir2 |
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
# Source: http://unix.stackexchange.com/a/3021/138212 | |
du -sh directory_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
// Source: https://www.smashingmagazine.com/2011/03/ten-things-every-wordpress-plugin-developer-should-know/ | |
// Replace `define('WP_DEBUG', false);` in `wp-config.php` with the following lines: | |
// Turns WordPress debugging on | |
define('WP_DEBUG', true); | |
// Tells WordPress to log everything to the /wp-content/debug.log file | |
define('WP_DEBUG_LOG', true); | |
// Doesn't force the PHP 'display_errors' variable to be on |
OlderNewer