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
hdiutil chpass image.dmg |
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
tell application "Transmit" | |
set favoriteList to favorites | |
repeat with i from 1 to (count favoriteList) | |
set theServer to item i of favoriteList | |
set theServerProperties to {address of theServer, local path of theServer, port of theServer, protocol of theServer, remote path of theServer, name of theServer, user name of theServer, identifier of theServer} | |
log theServerProperties | |
end repeat | |
end tell |
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
# SQLite path in Mac. | |
/Users/***/Library/Containers/com.evernote.Evernote/Data/Library/Application\ Support/com.evernote.Evernote/accounts/www.evernote.com/***/localNoteStore/LocalNoteStore.sqlite | |
# SQL | |
SELECT ZLOCALUUID FROM ZENNOTE WHERE ZGUID="foo"; |
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
# This command renames files. | |
find ./ ! -name '*.DS_Store' -type f -print0 | xargs -0 -L1 sh rename_sha512.sh |
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
find ./ -type f -print0 | while read -r -d '' file; do d=$(dirname "${file}"); mv -iv "${file}" "${d}/$(md5 -q ${file}).${file##*.}"; 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
#!/bin/sh | |
cat <<-EOF | xargs -L1 -P4 sh -c | |
'sleep 3; echo "sleep3 end"' | |
'sleep 4; echo "sleep4 end"' | |
'sleep 2; echo "sleep2 end"' | |
'sleep 1; echo "sleep1 end"' | |
EOF |
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
$ php -r "echo hash('sha256','test');" | |
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | |
$ printf 'test' | openssl sha256 | |
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | |
$ python --version | |
Python 3.6.0 | |
$ python -c 'import hashlib; print(hashlib.sha256(b"test").hexdigest())' | |
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 |
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/sh | |
prefix="__" | |
usage_error () | |
{ | |
echo "$0: $*" >&2 | |
print_usage >&2 | |
exit 2 | |
} |
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
php main.php | |
ec824fb844e4df008219d4c1af2a7673eff8a762aac7acef5104e021ee39c498a9389620571cb9e77627ec6a03e8d72b5930abc65d2a7c3265676897aa46bbc7 | |
python main.py | |
ec824fb844e4df008219d4c1af2a7673eff8a762aac7acef5104e021ee39c498a9389620571cb9e77627ec6a03e8d72b5930abc65d2a7c3265676897aa46bbc7 |
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
<?php | |
for ($i=0; $i<256; $i++) { | |
$hex = sprintf('%02s', dechex($i)); | |
$bin = pack('H*', $hex); | |
echo '0x'.$hex . ' ' . md5($bin) . PHP_EOL; | |
} | |
?> |
OlderNewer