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 | |
VERSION="1.17" | |
if [ ! -f wget-${VERSION}.tar.xz ]; then | |
wget http://ftp.gnu.org/gnu/wget/wget-${VERSION}.tar.xz | |
fi | |
rm -rf wget-${VERSION} build | |
tar xJf wget-${VERSION}.tar.xz |
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
document.addEventListener("DOMContentLoaded", () => { | |
$(function(){ | |
var datepicker = $('#result_calendar').datepicker().data('datepicker'); | |
datepicker.update('onSelect', function(formattedDate, date, inst){ | |
console.log(formattedDate); | |
}); | |
}); | |
}); |
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
document.addEventListener("DOMContentLoaded", () => { | |
$(function(){ | |
var datepicker = $('#result_calendar').datepicker().data('datepicker'); | |
datepicker.update('onSelect', function(formattedDate, date, inst){ | |
console.log(formattedDate); | |
}); | |
}); | |
}); |
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
<?xml version="1.0" encoding="UTF-8"?><MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:full:2011" minBufferTime="PT1.5S" mediaPresentationDuration="PT229S" type="static"><Period><AdaptationSet id="0" mimeType="audio/mp4" startWithSAP="1" subsegmentAlignment="true" contentType="audio"><Representation id="140" bandwidth="128000" codecs="mp4a.40.2"><AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/><BaseURL>https://r1---sn-42u-jmge.googlevideo.com/videoplayback?expire=1577703900&ei=fIUJXrjyOIuMlQTo_aWABg&ip=118.70.118.219&id=o-AHTwIMiyDTV8kbehKb_PBVfytZTPSGFUxfTlrIt_dWWd&itag=140&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-42u-jmge%2Csn-42u-nboel&ms=au%2Crdu&mv=m&mvi=0&pcm2cms=yes&pl=20&initcwndbps=1828750&mime=audio%2Fmp4&gir=yes&clen=3708205&dur=229.088&lmt=1576512482694904&mt=1577682216&fvip=1&keepalive=yes&fexp=23842630%2C23860863& |
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 ( | |
"fmt" | |
"strings" | |
) | |
const s = ` | |
one | |
two |
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 ( | |
"crypto/md5" | |
"encoding/hex" | |
) | |
func GetMD5Hash(text string) string { | |
hasher := md5.New() | |
hasher.Write([]byte(text)) | |
return hex.EncodeToString(hasher.Sum(nil)) | |
} |
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
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
// path/to/whatever does not exist | |
} | |
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
// path/to/whatever exists | |
} |
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
#user nobody; | |
worker_processes 4; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
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
1. | |
# vim /etc/sysctl.conf | |
fs.file-max = 999999 | |
net.ipv4.tcp_rmem = 4096 4096 16777216 | |
net.ipv4.tcp_wmem = 4096 4096 16777216 | |
net.ipv4.ip_local_port_range = 1024 65535 | |
2. | |
# vim /etc/security/limits.conf | |
root - nofile 999999 |
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 ( | |
"database/sql" | |
"gopkg.in/gorp.v1" | |
"log" | |
"strconv" | |
"github.com/gin-gonic/gin" | |
_ "github.com/go-sql-driver/mysql" |