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 | |
| for ((i=0; i<256; i++)); do | |
| printf "\e[48;5;${i}m %03d \e[0m" $i | |
| (((i + 3) % 6 == 0 )) && printf '\n' | |
| 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/bash | |
| # file: args.sh | |
| # date: 2018-08-17 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| LIST=(1 ' 2 3') | |
| at(){ | |
| for i in $@; do |
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 | |
| # file: rsync-repo.sh | |
| # date: 2018-07-18 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| LOCAL_DIR="/path/ubuntu" | |
| MIRROR_SRC="rsync://archive.ubuntu.com/ubuntu/" | |
| DISTS="bionic bionic-backports bionic-proposed bionic-security bionic-updates" | |
| COMPONENTS="main restricted universe multiverse" |
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 | |
| # file: migrate_github_plugin.sh | |
| # date: 2018-06-30 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| search_account_meta(){ | |
| grep -r "$*" ??/|awk -F':' '{print $1}'|uniq | |
| } |
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 | |
| # file: /sbin/mount.ntfs | |
| # date: 2018-05-26 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| if modprobe -q ufsd; then | |
| exec mount -t ufsd "$@" | |
| else | |
| exec mount -t ntfs-3g "$@" |
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
| date: 2018-05-26 | |
| license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| source:http://dl.paragon-software.com/free/Paragon-715-FRE_NTFS_Linux_9.5_Express.tar.gz | |
| --- | |
| diff -u a/ifslinux/ufsdvfs.c b/ifslinux/ufsdvfs.c | |
| --- a/ifslinux/ufsdvfs.c 2017-09-09 00:06:41.000000000 +0800 | |
| +++ b/ifslinux/ufsdvfs.c 2018-05-26 14:39:23.392496043 +0800 | |
| @@ -112,6 +112,10 @@ | |
| #include <linux/kthread.h> |
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 | |
| # file: you-get.sh | |
| # date: 2018-04-18 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| URL=$(zenity --entry --text=请输入视频地址) | |
| INFO=$(you-get -i "$URL"|sed 's/\x1b\[\wm//g') | |
| TITLE="$(echo "$INFO"|grep -Po '(?<=title:).*'|sed -r 's/^\s*//')" | |
| LIST=$(echo "$INFO"|grep -Po 'format:.*$|(?<=video-profile:).*$|(?<=size:).*MiB|(?<=container:).*$'|\ |
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 | |
| # file: ipsec-updown.sh | |
| # date: 2018-04-06 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| VERBOSE=1 | |
| RETRY=10 | |
| TIMEOUT=40 | |
| CHECK_INT=30 |
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 | |
| # file: dl_qt_example.sh | |
| # date: 2018-03-21 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| URL="http://doc.qt.io/qt-5/qtwidgets-itemviews-frozencolumn-example.html" | |
| BASE_URL=${URL%/*} | |
| curl -so- "$URL"|\ |
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
| /* | |
| * file: iptc_test.c | |
| * date: 2018-03-19 | |
| * license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| * author: nanpuyue <[email protected]> https://blog.nanpuyue.com | |
| * compile: gcc -lip4tc iptc_test.c -o iptc_test | |
| */ | |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <stdlib.h> |