-
-
Save giabao/8414868 to your computer and use it in GitHub Desktop.
Revisions
-
giabao revised this gist
May 23, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,6 @@ sudo tar -xzf jdk-8u91-linux-x64.tar.gz sudo ln -sfT jdk1.8.0_91 default sudo rm -f jdk-8u91-linux-x64.tar.gz update-alternatives --display java sudo update-alternatives --install /usr/bin/java java /opt/java/default/bin/java 1 java -version sudo update-alternatives --install /usr/bin/javac javac /opt/java/default/bin/javac 1 -
giabao revised this gist
May 23, 2016 . 1 changed file with 13 additions and 27 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,13 @@ alias dl='aria2c -x16 -s16 -k1M' cd ~/Downloads/ dl --header="Cookie: oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz sudo mkdir -p /opt/java && cd /opt/java sudo mv ~/Downloads/jdk-8u91-linux-x64.tar.gz . sudo tar -xzf jdk-8u91-linux-x64.tar.gz sudo ln -sfT jdk1.8.0_91 default sudo rm -f jdk-8u91-linux-x64.tar.gz update-alternatives --display java sudo update-alternatives --install /usr/bin/java java /opt/jdk/default/bin/java 1 java -version sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/default/bin/javac 1 -
giabao revised this gist
Jan 15, 2014 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,8 @@ #!/bin/bash #Use aria2c to download file #1. add params (to speedup downloading): -s16 -x16 -k1M #2. add --check-certificate=false --file-allocation=falloc # see http://aria2.sourceforge.net/manual/en/html/aria2c.html#cmdoption--file-allocation #3. simulate -o option of curl: # dl -o /dir/file url # will download file to /dir/file insteads of ./dir/file @@ -22,5 +23,5 @@ if [ "$val" ]; then args="-d /$args" fi args="-s16 -x16 -k1M --check-certificate=false --file-allocation=falloc $args" exec /usr/bin/aria2c $args -
giabao created this gist
Jan 14, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash #Use aria2c to download file #1. add params (to speedup downloading): -s16 -x16 -k1M #2. add --check-certificate=false #3. simulate -o option of curl: # dl -o /dir/file url # will download file to /dir/file insteads of ./dir/file args=" $@" # parse -o pat=".*\(\s-o\s*[^ ]*\).*" val=`expr match "$args" "$pat"` #parse --out= if [ ! "$val" ]; then pat=".*\(\s--out=\s*[^ ]*\).*" val=`expr match "$args" "$pat"` fi if [ "$val" ]; then args="-d /$args" fi args="-s16 -x16 -k1M --check-certificate=false $args" exec /usr/bin/aria2c $args