add the follow line to /etc/resolv.conf will let linux use tcp to resolve the hostname
options use-vc
requires glibc >= 2.14
example:
options timeout:1 attempts:3 use-vc
nameserver 8.8.8.8
| from twisted.internet import reactor, protocol | |
| class EchoClient(protocol.Protocol): | |
| def connectionMade(self): | |
| reactor.callLater(0, self.send_data, "1111") | |
| def send_data(self, data): | |
| self.transport.write(data) | |
| reactor.callLater(0, self.send_data, "1111") |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "github.com/miekg/dns" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
| #!/bin/bash | |
| # speed check url | |
| url="https://httpbin.org/bytes/10240" | |
| let i=0 | |
| timeout=3 | |
| while true | |
| do | |
| #ping -c 1 114.114.114.114 >/dev/null 2>&1 | |
| package main | |
| import ( | |
| //"net" | |
| //"net/http" | |
| "fmt" | |
| "log" | |
| //"os" | |
| "flag" | |
| "os/exec" |
| #!python | |
| import zipfile | |
| import os | |
| def unzip(filename, output_dir=".", filename_encode="gbk"): | |
| fp = zipfile.ZipFile(filename, "r") | |
| # get name list |
add the follow line to /etc/resolv.conf will let linux use tcp to resolve the hostname
options use-vc
requires glibc >= 2.14
example:
options timeout:1 attempts:3 use-vc
nameserver 8.8.8.8
| #!/bin/bash | |
| # refer to http://www.sajalkayan.com/post/go-android-binary.html | |
| export GOMOBILE="$GOPATH/pkg/gomobile" | |
| export GOOS=android | |
| export GOARCH=arm | |
| export CC=$GOMOBILE/android-ndk-r12b/arm/bin/arm-linux-androideabi-clang | |
| export CXX=$GOMOBILE/android-ndk-r12b/arm/bin/arm-linux-androideabi-clang++ | |
| export CGO_ENABLED=1 | |
| export GOARM=7 | |
| go build -p=8 -pkgdir=$GOMOBILE/pkg_android_arm -tags="" -ldflags="-extldflags=-pie" "$@" |
# create a file and assign to a loop block device
# create a test file
dd if=/dev/zero of=test.img bs=1M count=100
# make the file to be a block device
losetup /dev/loop0 ./test.img
# create ext4 filesystem
mkfs.ext4 /dev/loop0
| links = [ | |
| "magnet:?xt=urn:btih:f4bc1fab97b92cfefd7312010190f7f334593f2b&dn=Gotham.S02E07.720p.HDTV.X264-DIMENSION%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710", | |
| "magnet:?xt=urn:btih:79a2c486675a1b2168dab1d27734955393979799&dn=Gotham.S02E11.720p.HDTV.X264-DIMENSION%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710" | |
| ]; | |
| links.forEach(function(v,i,a){ | |
| $("#_disk_id_2").click(); | |
| $("#share-offline-link").value=v; | |
| $('a[data-button-id="b67"]').click(); | |
| $('a[data-button-id="ddasdffff"]'); |
| #!python | |
| # -*- coding: utf-8 -*- | |
| import code | |
| import os | |
| import sys | |
| if __name__ == "__main__": | |
| libraries = ["python27.zip", "library.zip"] | |
| for f in libraries: |