Skip to content

Instantly share code, notes, and snippets.

View CoelacanthusHex's full-sized avatar
☹️
Depression

Coelacanthus CoelacanthusHex

☹️
Depression
View GitHub Profile
@CoelacanthusHex
CoelacanthusHex / keybase.md
Created August 12, 2021 16:48
Keybase Proof

Keybase proof

I hereby claim:

  • I am coelacanthushex on github.
  • I am coelacanthus (https://keybase.io/coelacanthus) on keybase.
  • I have a public key ASDsWJRETyyxnuZCN_eZZ2rDmoS_bAd9RpWbdaOTkmoVTwo

To claim this, I am signing this object:

@CoelacanthusHex
CoelacanthusHex / Dockerfile.mingw
Last active June 21, 2021 17:29
Cross-Build Aria2
# Dockerfile to build aria2 Windows binary using ubuntu mingw-w64
# cross compiler chain.
#
# $ sudo docker build -t aria2-mingw - < Dockerfile.mingw
#
# After successful build, windows binary is located at
# /aria2/src/aria2c.exe. You can copy the binary using following
# commands:
#
# $ id=$(sudo docker create aria2-mingw)

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@CoelacanthusHex
CoelacanthusHex / README.md
Created July 9, 2020 04:53 — forked from hubgit/README.md
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@CoelacanthusHex
CoelacanthusHex / latency.txt
Created May 1, 2020 15:16 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
*://*.005382a.com/*
*://[.0123456789][.0123456789]*.[abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyz]*/*
*://*.[0123456789][0123456789]*.com/*
*://[0123456789][0123456789]*.com/*
*://[^a-z0-9](((([0-9]|syscan|400[0-9]{4}|os|i|luyou|)(360).*)|(qi(yuns3|xintongda|koo|hucdn|du|aoqiao|hoo(yun)?))|(sou?)|(qh(img|cdn|cdn|setup|msg|static|update))|(yun(id|pan))|(51(ast|hutong|assist)|secmp|msecret|201[0-9]pan|hackpwn|koux[iu]n|55dns|mgamer))\.(cn|com|net|中国)|((soulworker|cnao\.net|nelab-bdst\.org|urlqh|defcongroup|defcongroups|secmp\.org|idctj|vcloudglb|vcloudgtm|ixiangpai|xiuxiuge|whoisdb|passive-dns|passivedns|yongxinwan|leidian|gongxiangqun|mobile-it|airwatch\.com|adviva(\.com)?|mediav(iva)?\.com|cloudid(\.com)?|msecret\.com|mcleaner(\.com)?|mcleaner|mytoken(\.com)?|biji)\.cn))/*
*://*.01dm.cn.com/*
*://*.027xdl.com/*
*://*.0371cc.com/*
*://*.04dy.cn.com/*
*://*.05878.org.cn/*