Skip to content

Instantly share code, notes, and snippets.

View lordloh's full-sized avatar

Bharath Bhushan Lohray lordloh

View GitHub Profile
@frasertweedale
frasertweedale / hotp.py
Last active August 19, 2018 22:45
HOTP implementation; Python
import hashlib
import hmac
import struct
def dt(mac):
hdig = mac.hexdigest()
offset = int(hdig[-1], 16)
p = hdig[offset * 2 : offset * 2 + 8]
return int(p, 16) & 0x7fffffff
@potch
potch / gist_line_numbers.css
Created September 26, 2011 18:53
CSS to add line numbers to embedded gists
.gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist-highlight pre {
counter-reset: linenumbers;
}
.gist-highlight pre div:before {
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: