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 | |
# How can we eat the fish any more once we can read their minds? -- The dolphin lady | |
# Purpose: | |
# Make multiple links in current working directory. A "ln -s" wrapper. | |
# Usage: | |
# lns_multi_cwd.bash lnk_target_path_1 lnk_target_path_2 ... | |
# lns_multi_cwd.bash /path/dir/* |
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 | |
# Tag line editing | |
# Change the line | |
# from | |
# vocabulary grammar | |
# to | |
# tag:: vocabulary grammar | |
# Change by given tag value such as "vocabulary" or "grammar" | |
# Omit the tag line if they already have the key word of "tag" |
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 | |
# Once the global warmth reaches a tipping point, | |
# the chain-reaction could be irreversible, | |
# so are we ready for the ticking bomb? | |
# Usage: | |
# ./touchsh file_name | |
# No touch operation if file already existed. |
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 | |
# Usage: | |
# sha1sum_file_vs_sumstr.sh /path/to/file sum_str | |
sha1sum "$1" | |
sha1_result=$(sha1sum "$1") | |
sum=${sha1_result%% *} | |
echo |
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 | |
# call this file in your profile as background job | |
set -e | |
# Adjust this value if it's too long or too short to wait | |
sleep 600 | |
# You need to change this path for your own directory | |
BASE_DIR=/path/to/your_notify_dir |
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 | |
# What if we could adjust the clock, | |
# making a day of a virtual AI world much shorter than ours? | |
# What if a virtual AI being could spend its whole long life | |
# in a blink of our eyes? | |
############################################################# | |
# Purpose: | |
# Purge redundant Ubuntu kernel files by rules defined in the script |
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
# http://manpages.ubuntu.com/manpages/trusty/man1/cutmp3.1.html | |
cutmp3 -i source_file.mp3 -a 0:37 -b 1:25 | |
cutmp3 -i file.mp3 -a 0:37 -b 1:25 -o file_ -q | |
# cut from the start | |
cutmp3 -i file.mp3 -a 0:00 -b 1:25 -o file_ -q |
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 | |
# images are continueously updated in a given directory [img_src_dir] | |
# use the `ls -t` command to find the latest image file | |
# use eog to show the latest image file dynamically | |
# In the eog Preferences/Slideshow, uncheck the "Loop sequence" option | |
# So EOG and Entangle can be used together | |
img_src_dir="/home/to/Capture" |
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 | |
# https://superuser.com/questions/211561/loop-pictures-from-a-folder-and-display-fullscreen-slideshow | |
# It's better to adjust gthumb to "Fit to window" in preferences. | |
# Image Viewer(eog) could do the same job as gthumb, if in full screen mode. | |
# use absolute path instead of relative path in case something went wrong | |
test_img_path="/path/to/test.jpeg" | |
img_folder_path="/path/to/testdir_with_images" |