Skip to content

Instantly share code, notes, and snippets.

Mike Ivanov mikeivanov

View GitHub Profile
View startswank.lisp
(in-package swank)
(setq swank-debugger-hook-orig #'swank-debugger-hook)
(defun swank-debugger-hook (condition hook)
(etypecase condition
(princ "*** Stream error" *error-output*)
mikeivanov / contextsearch.el
Created Apr 2, 2012
Duckduckgo the term under cursor
View contextsearch.el
(defun search-selection-or-symbol (arg)
(interactive "p")
(unless (and (local-variable-p 'search-prefix-default)
(let* ((mode (symbol-name major-mode))
(name (replace-regexp-in-string "-mode$" "" mode))
(prefix (replace-regexp-in-string "-" " " name)))
(set (make-local-variable 'search-prefix-default) prefix)))
(let* ((prefix (if (= arg 1)
mikeivanov /
Created Jun 29, 2011
Pure Python Paillier Homomorphic Cryptosystem
import math
import primes
def invmod(a, p):
The multiplicitive inverse of a in the integers modulo p.
Return b s.t.
a * b == 1 mod p
You can’t perform that action at this time.