Skip to content

Instantly share code, notes, and snippets.

View sesam's full-sized avatar

Simon B. sesam

  • LJ
View GitHub Profile
@harding
harding / qc-upgrade-path.md
Created July 23, 2018 11:44
Description of Tim Ruffing's upgrade path to post-quantum in presence of QC attackers

Background: future fast Quantum Computers (QCs) are hypothesized to be much faster at solving various forms of the Discrete Log Problem (DLP) than classical computers (e.g. what we use now). Bitcoin uses the DLP in what's called a trapdoor function: a function that's easy to compute one way (a private key generating a public key) but hard to compute the other way (using a public key to recover the original private key). Fast QCs break that trapdoor, hypothetically allowing the operator of the QC to steal the bitcoins from anyone whose public key is publicly known.

@leovandriel
leovandriel / gist:4579113
Last active June 4, 2019 06:13
Country code lookup using offline quadtree generated by Yggdrasil (https://github.com/leonardvandriel/Yggdrasil)
# Country code lookup using offline quadtree generated by Yggdrasil.
# https://github.com/leonardvandriel/Yggdrasil
# This Ruby script can be used to determine the ISO 3166 country at a given
# WGS 84 coordinate. Lookup is based on quadtree data stored in the remainder
# of this file. This data can be compressed to under 20 KB, while providing
# lookup accuracy under 40 km.
# License: BSD
# Author: Leonard van Driel, 2013
require 'json'
@henrik
henrik / searcher.rb
Created February 13, 2012 16:55
Example of how to handle "ThinkingSphinx::SphinxError: index item_core: index not preread" type errors from Thinking Sphinx. As mentioned in http://groups.google.com/group/thinking-sphinx/browse_thread/thread/4854326d6c388da2
class Searcher
def search(query)
with_retries do
Item.search(query, populate: true)
end
end
private