Skip to content

Instantly share code, notes, and snippets.

View ylxdzsw's full-sized avatar
🐟
摸鱼

ylxdzsw

🐟
摸鱼
View GitHub Profile
@ylxdzsw
ylxdzsw / dns.jl
Created September 19, 2018 04:55
see if you got a bad dns server
using Fire
using Dates
using Base64
using Sockets
using OhMyJulia
using Statistics
import Base.adjoint # monky patch
adjoint(x::Unsigned) = ntoh(x)
@ylxdzsw
ylxdzsw / gist:9b4dab4a3548a2f67a53d93c5b235fb5
Created August 20, 2018 09:58
random list of some domains.txt
s: server, c: cdn, a: ad, t: tracker, o: other, u: unknown
a doubleclick.net
a adnxs.com
t google-analytics.com
c akamaihd.net
t fonts.gstatic.com
a dotomi.com
a lkqd.net
a advertising.com
@ylxdzsw
ylxdzsw / combinePdfFiles.tex
Last active August 17, 2018 01:48 — forked from ppanyukov/combinePdfFiles.tex
Combine and rotate several PDF files into one using LaTeX (useful when you use a sucking scanner)
\documentclass[a4paper]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-, scale=1, angle=30]{p01.pdf}
\includepdf[pages=-, scale=1, angle=30]{p02.pdf}
\includepdf[pages=-, scale=1, angle=30]{p03.pdf}
\includepdf[pages=-, scale=1, angle=30]{p04.pdf}
\end{document}
@ylxdzsw
ylxdzsw / proxy.pac
Last active December 3, 2019 14:12
my pac file
// ylxdzsw's minimalistic pac
const [DIRECT, PROXY] = "__DIRECT__" == "__DIR" + "ECT__" // __xx__ will be replaced when used within some softwares
? ["DIRECT", "SOCKS5 localhost:1080"]
: ["__DIRECT__", "__PROXY__"]
const list = [
// frequent
/google/,
"github.com",
@ylxdzsw
ylxdzsw / .zshrc
Last active February 11, 2020 16:39
my zsh config template
#=== Settings ===#
setopt AUTOCD
setopt AUTOPUSHD PUSHDMINUS PUSHDIGNOREDUPS
disable r
DIRSTACKSIZE=10
HISTFILE=~/.zsh_history
HISTSIZE=65535
@ylxdzsw
ylxdzsw / draw_dep.jl
Last active October 1, 2016 03:03
generate dot code that generates a graph of an abstract julia type
function draw_dep(T::Type; package_name::Bool=false, upper_bound::Bool=true)
_draw(T::ANY) = for t in subtypes(T)
print(g, " \"")
format_type(T)
print(g, "\" -> \"")
format_type(t)
println(g, '\"')
_draw(t)
end