Skip to content

Instantly share code, notes, and snippets.

View vonavi's full-sized avatar

Vladimir Ivanov vonavi

  • Huawei Technologies Co. Ltd
  • Moscow, Russia
View GitHub Profile
@vonavi
vonavi / ljdump-async.el
Last active December 21, 2023 21:38
Dump LiveJournal posts and comments
;;; ljdump-async.el --- Dump LiveJournal posts and comments -*- lexical-binding: t; -*-
;; Copyright (C) 2021 Vladimir Ivanov
;; Author: Vladimir Ivanov <ivvl82@gmail.com>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@vonavi
vonavi / fetch-blog.el
Created November 16, 2020 13:54
Fetch blog archive
;;; fetch-blog.el --- Fetch blog archive
;; Copyright (C) 2020 Vladimir Ivanov
;; Author: Vladimir Ivanov <ivvl82@gmail.com>
;; Keywords:
;;; Commentary:
;;
theory gcd
imports Main
begin
fun gcd :: "nat ⇒ nat ⇒ nat" where
"gcd a 0 = a" |
"gcd a b = gcd b (a mod b)"
lemma div_mod_eq:
fixes a b :: nat
@vonavi
vonavi / msort.thy
Last active September 8, 2020 12:04
theory
msort
imports
Main
Classes.Classes
begin
datatype 'a msort = Seg "'a × 'a" | Empty | Fail
instantiation msort :: (ord) monoid
@vonavi
vonavi / pdf_paint.py
Last active September 6, 2019 17:21
Paint a PDF file to hide parts of words
#!/usr/bin/env python3
import os
import argparse
import random
import fitz
class Config:
def get_mark_range(self, y, mark):
@vonavi
vonavi / evince-subpixel-rendering.patch
Created August 16, 2013 17:25
Force subpixel rendering for Evince 2.32.0.
--- backend/pdf/ev-poppler.cc 2010-09-27 19:54:34.000000000 +0300
+++ backend/pdf/ev-poppler-patched.cc 2013-08-16 20:08:43.000000000 +0300
@@ -342,6 +342,23 @@
return label;
}
+/* For some reason, cairo doesn't put this in the public header. */
+typedef enum _cairo_lcd_filter {
+ CAIRO_LCD_FILTER_DEFAULT,
+ CAIRO_LCD_FILTER_NONE,