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
```dataviewjs | |
// find dates based on format [[YYYY-MM-DD]] | |
const findDated = (task)=>{ | |
if( !task.completed ) { | |
task.link = " " + "[[" + task.path + "|*]]"; | |
task.date=""; | |
const found = task.text.match(/\[\[([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))\]\]/); | |
if(found) task.date = moment(found[1]); | |
return true; | |
} |
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
for item in * | |
do | |
unzip $item | |
name=$(echo $item | cut -f1 -d ' ' ) | |
echo "all_files.zip" $name".ext" | |
done |
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
gzip -d "" -f gzippe_file | |
# for several files under several directories: | |
for item in $(ls -d -1 $PWD/##/#); do echo $item; zcat $item > temp; sed -i 's/, / /g' temp; gzip temp; mv temp.gz $item; done; |
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
for FILE in $(ls #.pckl); do | |
NAME=$(echo $FILE | cut -d '_' -f 1) | |
NAMEAPK=$NAME.apk | |
mv $FILE DONE/ | |
mv $NAMEAPK DONE/ | |
done | |
for FILE in $(ls #.pckl); do NAME=$(echo $FILE | cut -d '_' -f 1); NAMEAPK=$NAME.apk; mv $FILE DONE/; mv $NAMEAPK DONE/; done |
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
for FILE in $(ls | grep -v \\.); do | |
PCKL_FILE=$(echo ${file:0:60}.pckl) | |
NEW_PCKL_FILE=$FILE.pckl | |
mv $PCKL_FILE $NEW_PCKL_FILE | |
done |
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
find . -name "#.zip" -exec mv {} /dest_dir/ \; |
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
find . -type f -exec mv '{}' '{}'.jpg \; |
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
(Pdb) pdb.set_trace = lambda: None # This replaces the set_trace() function! |
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
rsync -aHAXxv --numeric-ids --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir> | |
# If it gives an error: | |
rsync -av --numeric-ids --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir> | |
NewerOlder