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 | |
rm -rf bigfile.bin | |
for i in {1..20}; do | |
echo "++ test $i download... ++" | |
rm -rf dowloaded_bigfile.bin | |
dd if=/dev/urandom of=./bigfile.bin bs=1048570 count=100 2> /dev/null >> /dev/null | |
curl -o dowloaded_bigfile.bin http://localhost:8000/bigfile.bin 2> /dev/null > /dev/null | |
md5sum bigfile.bin dowloaded_bigfile.bin |
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 | |
rm -rf file*.bin | |
rm -rf test_tar.tar test_my_tar.tar mytest6 test6 | |
dd if=/dev/zero of=./file1.bin bs=1048570 count=1 2> /dev/null >> /dev/null | |
dd if=/dev/zero of=./file2.bin bs=1048570 count=2 2> /dev/null >> /dev/null | |
dd if=/dev/zero of=./file3.bin bs=1048570 count=3 2> /dev/null >> /dev/null | |
dd if=/dev/zero of=./file4.bin bs=1048570 count=4 2> /dev/null >> /dev/null | |
dd if=/dev/zero of=./file5.bin bs=1048570 count=5 2> /dev/null >> /dev/null |
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
./configure \ | |
--prefix=/usr/share/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--lock-path=/var/lock/nginx.lock \ | |
--pid-path=/run/nginx.pid \ | |
--modules-path=/usr/lib/nginx/modules \ | |
--http-client-body-temp-path=/var/lib/nginx/body \ | |
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ |
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
// include the required packages. | |
var gulp = require('gulp'); | |
var stylus = require('gulp-stylus'); | |
var koutoSwiss = require( "kouto-swiss" ); | |
// Options | |
// Options compress | |
gulp.task('styles', function () { | |
return gulp.src('./css/main.styl') | |
.pipe(stylus({ |
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/sh | |
cd $HOME; | |
echo "Running apt-get update ..." | |
sudo apt-get update > /dev/null | |
echo "Install installing dependencies ..." | |
sudo apt-get install -y --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev > /dev/null | |
if [ -d "shadowsocks-libev" ]; then | |
echo -n; |
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/zsh | |
# completion | |
autoload -U compinit | |
compinit | |
zstyle ':completion:*' menu select | |
setopt MENU_COMPLETE | |
# correction |
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
30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log |
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
package main | |
/* | |
** generate certifictes: | |
** $> openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem | |
** [...] | |
** Country Name (2 letter code) [AU]:CN | |
** State or Province Name (full name) [Some-State]: | |
** Locality Name (eg, city) []: | |
** Organization Name (eg, company) [Internet Widgits Pty Ltd]: |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"github.com/gin-gonic/gin" | |
"golang.org/x/oauth2" | |
"golang.org/x/oauth2/bitbucket" | |
"golang.org/x/oauth2/github" | |
"golang.org/x/oauth2/google" |