Skip to content

Instantly share code, notes, and snippets.

@ioparaskev
ioparaskev / dov_ssha512.py
Created February 10, 2015 21:56
Dovecot Salted SHA 512 encoder/decoder for Python 3
#This is a porting of https://gist.github.com/garrettreid/8329796
# to Python 3 with some more additions (time compare, dialogs etc)
# for Python 2.x use the above gist
from hashlib import sha512
import os
import base64
from operator import _compare_digest as constant_time_compare
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active October 30, 2025 15:53
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@weakish
weakish / README.markdown
Last active December 18, 2023 05:58
#Solarized themes (dark and light) for #roxterm.
@kogakure
kogakure / .gitignore
Last active March 10, 2026 13:13
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst