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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Movie YEAR --> | |
| <movie> | |
| <title>Movie 電影</title> | |
| <originaltitle>Movie</originaltitle> | |
| <sorttitle>Movie</sorttitle> | |
| <year>YEAR</year> | |
| <set></set> | |
| <tag></tag> | |
| <tag></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/bash | |
| x=`ping -c1 google.com 2>&1 | grep unknown` | |
| if [ ! "$x" = "" ]; then | |
| echo "rebooted" >> /home/$USER/admin.log | |
| reboot | |
| fi |
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 | |
| # print all arguments | |
| function this { for i in "$@"; do echo "$i"; done } | |
| this "$@" | |
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 | |
| # author: rix | |
| # === rename v1 === | |
| # easily rename files in shell | |
| # HOW TO USE | |
| # run script without argument, or specify file*, | |
| # the script will prompt to find: and replace: | |
| # ./rename.sh myfile.* | |
| # === use at your own risk === |
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 | |
| # rsync backup for daily cron | |
| rsync -avhP --delete-before rix@192.168.1.104:~/nfs/ /home/rix/srv/rsync/ --log-file=rsync.log | |
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/bin/env python3 | |
| # example list | |
| csvlist = [['ID','a','b','c','d'],[0.453,0.234,0.345,0.236,0.285],[2.344,4.234,3.345,7.346,3.757]] | |
| # print vertical csv output | |
| mainlist = [] | |
| x = 0 | |
| y = len(csvlist[0]) | |
| while x < y: |