Skip to content

Instantly share code, notes, and snippets.

View infinity0's full-sized avatar
🛠️
build bridges to the stars, not battleships and sports cars

Ximin Luo infinity0

🛠️
build bridges to the stars, not battleships and sports cars
View GitHub Profile
#!/usr/bin/python
#
# Usage:
#
# $ ./conception.py 1969-12-25
# searching for most recent event before 1969-04-03
# <li><a href="/wiki/April_1" title="April 1">April 1</a>
# &#226;&#8364;&#8220; The <a href="/wiki/Hawker_Siddeley_Harrier" title="Hawker Siddeley Harrier">Hawker Siddeley Harrier</a> enters
# service with the <a href="/wiki/Royal_Air_Force" title="Royal Air Force">Royal Air Force</a>.</li>
#
@infinity0
infinity0 / compat
Last active August 29, 2015 14:00
Stub debian packaging for ctlog
9
@infinity0
infinity0 / rfc2822_to_iso8601.py
Created June 22, 2015 19:53
RFC2822 to ISO8601 date converter
#!/usr/bin/python
# RFC2822 to ISO8601 date converter, that doesn't require you to fuck with the TZ variable.
# Fuck the POSIX time functions.
import time, email.utils, sys
t = email.utils.parsedate_tz(sys.argv[1])
t, tz = t[:-1], t[-1]
print(time.strftime("%Y-%m-%dT%H:%M:%S", t) + "{0:+03d}{1:02d}".format(tz/3600, tz/60%60))
@infinity0
infinity0 / test.py
Last active October 14, 2015 17:53
how to combine two x25519 private keys
#!/usr/bin/python3 -i
from nacl.bindings import *
from binascii import b2a_hex
BO = "little"
order_b = 2**252 + 27742317777372353535851937790883648493
order = 8 * order_b
@infinity0
infinity0 / build-ghetto-deb-ocamleditor.sh
Created November 7, 2015 21:04
Build a ghetto binary debian package of OCamlEditor
#!/bin/sh
# Run this from a clone of:
# https://forge.ocamlcore.org/anonscm/git/ocamleditor/ocamleditor.git
set -e
VERSION="${VERSION:-1.13.2}"
git checkout $VERSION
git clean -fdx
@infinity0
infinity0 / conf-partial.py
Created November 8, 2015 22:03
Sphinx LaTeX workarounds
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
@infinity0
infinity0 / apt.conf
Created January 12, 2016 11:48
Debian testing prefs files
APT::Default-Release "testing";
#Aptitude::Purge-Unused "true";
APT::Architectures { "amd64"; "i386"; };
@infinity0
infinity0 / frag.rst
Last active May 18, 2016 19:50
Fragmentation protocols

Fragmentation protocol

Parties

the transport
  • the party that controls the physical communication. for example yourrouter, or your IRCS network (the set of servers)
  • note that in an IRC network where one or more links are non-SSL then the whole world is effectively the IRC network
@infinity0
infinity0 / fuck-gnome.txt
Last active March 15, 2022 04:56
Fuck GNOME
Right about now, Free Software court is in full effect
Judge Whax presiding
In the case of Free Software vs. the GNOME Foundation;
prosecuting attorneys are: Satoshi, YYY, and ZZ-motherfucking-Z
Order, order, order
Satoshi, take the motherfucking stand
Do you swear to tell the truth, the whole truth
and nothing but the truth so help your nerd ass?
@infinity0
infinity0 / .gitignore
Last active February 28, 2020 14:59
OCaml lens
*.cm*
/a.out