This file contains hidden or 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
| --2011-06-10 | |
| --http://organognosi.blogspot.com/ | |
| tell application "Skim" | |
| set the clipboard to "" | |
| set numberOfPages to count pages of document 1 | |
| activate | |
| set myColorCodes to my chooseColor() | |
| display dialog "Do you want to export all the notes or some of them?" buttons {"All", "Some"} default button 1 | |
| set answer to button returned of the result | |
This file contains hidden or 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
| (defun org-export-to-devonthink (arg) | |
| "Call `org-export-to-devonthink` with output to a temporary buffer. | |
| No file is created." | |
| (interactive "P") | |
| (let (content) | |
| (org-export-as-html arg nil nil "*Org HTML Export*") | |
| (switch-to-buffer "*Org HTML Export*") | |
| (setq content (buffer-string)) | |
| (kill-buffer "*Org HTML Export*") | |
| (setq content (replace-regexp-in-string (regexp-quote "\"") "\\\"" content t t)) |
This file contains hidden or 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
| (use-package smtpmail | |
| :config | |
| (setq message-send-mail-ggfunction 'smtpmail-send-it | |
| smtpmail-stream-type 'starttls | |
| smtpmail-default-smtp-server "smtp.gmail.com" | |
| smtpmail-smtp-server "smtp.gmail.com" | |
| smtpmail-smtp-service 587 | |
| send-mail-function 'smtpmail-send-it)) |
This file contains hidden or 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
| _______________________________________________________ | |
| | | | |
| / | Apps by Chris | | |
| /---, | Quality Retail MAS Apps for Mac | | |
| -----# ==| | Requests: [email protected] | | |
| | :) # ==| | | | |
| -----'----# | |______________________________________________________| | |
| |)___() '# |______====____ \___________________________________| | |
| [_/,-,\"--"------ //,-, ,-,\\\ |/ //,-, ,-, ,-,\\ __# | |
| ( 0 )|===******||( 0 )( 0 )||- o '( 0 )( 0 )( 0 )|| |
This file contains hidden or 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
| # generate 0-byte sub | |
| find src/ -type d -exec mkdir -p dest/{} \; \ | |
| -o -type f -exec touch dest/{} \; | |
| # generate index, name only | |
| # http://stackoverflow.com/questions/9102313/rsync-to-get-a-list-of-only-file-names | |
| # x-devonthink-item://17E800D2-CEF3-46BB-8828-872C51C05698 | |
| # idea: make a new empty folder, run rsync --dry-run(-n) recursively(-r) | |
| # grep -v '.git' excludes .git files | |
| # grep -Ev '.git|.DS_Store' excludes both .DS_Store and .git, -E is a must |
This file contains hidden or 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
| line=$(wc -l $fullname | awk '{ print $1; }'); | |
| echo $line |
This file contains hidden or 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
| #!/usr/texbin/perl | |
| use strict; | |
| use warnings; | |
| my $ROOT = "/Volumes/DATA/Dropbox/Research/Papers2/"; # dir holding data files | |
| #my $ROOT = "$ENV{HOME}/Downloads/Test/SRC"; # dir holding data files | |
| my $META = "$ENV{HOME}/Downloads/Test/DEST"; # dir holding meta files | |
| my %FILE_TO_DATE = file_hash( $ROOT ); |
This file contains hidden or 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 | |
| ROOT=/volume1/LIBNS/ | |
| for i in $(ls $ROOT |grep -Ev '@eaDir|_libman|LIBRARY' |grep '.*'|grep WORK); do | |
| echo $i | |
| TMP_DIR=`mktemp -d /tmp/rsync.XXXXXX` | |
| IDX_DIR=${ROOT}${i}"/" | |
| echo $IDX_DIR | |
| rsync -nr --out-format='%n' $IDX_DIR $TMP_DIR | grep -Ev '@SynoResource|@eaDir|.git|.DS_Store|Mao|Aaron' > "${i}_`date +%F`".txt | |
| rmdir $TMP_DIR | |
| done |
This file contains hidden or 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
| archive="../_lib.idx_achive/" | |
| if [ ! -d $archive ]; then | |
| mkdir $archive | |
| fi | |
| for i in `ls`; do | |
| if [ $i != $0 -a ! -d $i ]; then | |
| fullname=$i; | |
| name=${i%.*}; | |
| if [ ! -d $name ]; then |
This file contains hidden or 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
| import java.util.List; | |
| import java.util.ArrayList; | |
| interface Entity { | |
| public int getId(); | |
| public int getKind(); | |
| } | |
| interface Taggable { | |
| public void addTag(int tagId); |