Skip to content

Instantly share code, notes, and snippets.

Code Terminology Kind Usage Line
$scr scripting additions folder Property of class: domain System Events : Disk-Folder-File Suite 1
%doc music folder Property of class: user domain object System Events : Disk-Folder-File Suite 2
µdoc music folder Enumeration Standard Additions : File Commands 3
ƒhlp help Enumeration Standard Additions : File Commands 4
ƒhlp help folder Enumeration Standard Additions : File Commands 5
ƒlib shared libraries Enumeration Standard Additions : File Commands 6
ƒlib shared libraries folder Enumeration Standard Additions : File Commands 7
ƒmod modem scripts Enumeration Standard Additions : File Commands 8
ƒmod modem scripts folder Enumeration Standard Additions : File Commands 9
AlexanderPavlenko /
Created December 21, 2017 14:11
GIMP filter
#!/usr/bin/env python
from gimpfu import *
def vr_blur(image, layer):
# width = 3840
# height = 1.0*width*layer.height / layer.width
# layer = pdb.gimp_drawable_transform_scale(layer, 0, 0, width-1, height-1, TRANSFORM_FORWARD, INTERPOLATION_LANCZOS, 1, 3, TRANSFORM_RESIZE_ADJUST)
# layer.translate(0, 540 - layer.height/2)
# pdb.gimp_layer_flatten(layer)
AlexanderPavlenko /
Last active April 22, 2023 11:58
bit32_rescue #bitcoin

If you have received a payment to some address, which is not listed in your wallet, but was generated from your XPub — don't worry, it's not lost and can be recovered as follows:

  1. install Electrum (tested on version 2.7.12)
  2. in Electrum, restore wallet with the inaccessible funds from its BIP32 Passphrase (also called Seed, 13 words)
  3. in the restored wallet, switch to Console tab, paste getmasterprivate(), hit enter
  4. visit
  5. select "Derive From: BIP32 Key"
  6. paste xprv… from Electrum Console into the "BIP32 Extended Key" field
  7. select "Derivation Path: Custom"
  8. paste m/0/n (or whatever is your gateway's address_derivation_scheme) into the "Custom Path" field, where n is the order's keychain_id
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
# i3 config file (v4)
# Please see for a complete reference!
### Keybase proof
I hereby claim:
* I am AlexanderPavlenko on github.
* I am alerticus ( on keybase.
* I have a public key whose fingerprint is 21A4 17B8 8937 82DE A577 052F BABE D11F BE87 3DB9
To claim this, I am signing this object:
AlexanderPavlenko / gist:7099831
Created October 22, 2013 12:32
replace static links to less methods
AlexanderPavlenko / gist:6078702
Created July 25, 2013 11:00
values_at vs. map
require 'benchmark'
n = 1000 do |bm|
keys = (1..10000).to_a
hash = Hash[] do
n.times do{|key| hash[key] }
AlexanderPavlenko / buggy_enumerator.rb
Created July 25, 2013 10:02
JRuby's Enumerator#to_enum rebinds instance variables to another context?
class BuggyEnumerator < Enumerator
def initialize(that)
@ivar = that
def each
return to_enum(:each) unless block_given?
@ivar.each{|item| yield item }
require 'timeout'
Timeout.timeout(0.5) do
sleep 1
rescue Exception => ex
puts ex.inspect
puts 'ಠ_ಠ'
f ='/tmp/tr', 'w')
set_trace_func proc {
|event, file, line, id, binding, classname|
if event == "call" or event == "return"
f.printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname