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
#!/bin/bash | |
iscsiadm --mode discovery --type sendtargets --portal $1 |
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
#!/bin/bash | |
echo "iscsiadm -m node --targetname $1 --portal $2 --login" | |
iscsiadm -m node --targetname $1 --portal $2 --login |
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
#!/bin/bash | |
BAKIFS=$IFS #internal filed separator | |
IFS=$'\n' | |
rm -rf ~/.cache/thumbnails/fail | |
for FILE in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do | |
touch -m "$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
import sys | |
import os | |
import tempfile | |
import shutil | |
def fix(src_filename, dst_filename, src_enc, dst_enc): | |
with open(src_filename, mode='r', encoding=src_enc) as file_in: | |
with open(dst_filename, mode='w', encoding=dst_enc) as file_out: | |
file_out.write("""<SAMI> | |
<HEAD> |
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
#!/bin/bash | |
# origin: | |
# https://bbs.archlinux.org/viewtopic.php?id=171655 | |
#inspired of: | |
# http://unix.stackexchange.com/questions/4489/a-tool-for-automatically-applying-randr-configuration-when-external-display-is-p | |
# http://ozlabs.org/~jk/docs/mergefb/ | |
# http://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes/181543#181543 | |
# arandr script |
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
#!/usr/bin/env bash | |
find . -name '*.txt' -type f -print0 | wc -l --files0-from=- |
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
#!/usr/bin/env bash | |
find . -name "*.gz" | xargs -P 5 -I fileName sh -c 'gunzip -c "fileName" > "$(basename -s .gz "fileName")"' |
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
#!/usr/bin/env bash | |
rsync -a --stats --progress .??* ~/old_dotfiles/ |
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
#!/usr/bin/env bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: ${0##*/} SRC DEST" | |
exit | |
fi | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Usage: ${0##*/} SRC DEST" | |
exit | |
fi |
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
#!/usr/bin/env bash | |
# stop it if it's running | |
dropbox stop &>/dev/null | |
# start it properly | |
env XDG_CURRENT_DESKTOP=Unity QT_STYLE_OVERRIDE="" dropbox start -i |