Skip to content

Instantly share code, notes, and snippets.

vladignatyev /
Created May 22, 2021
Elbrus Bootcamp: Back To The 80's Demo
# MIT License
# Copyright (c) 2021 Vladimir Ignatev <>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
vladignatyev / base64utils.js
Last active Jun 15, 2020
toBinary() and fromBinary() workaround to make atob() and btoa() work with UTF strings. Example for the original blog post at website
View base64utils.js
* The following snippet is from the Mozilla Developer Portal documentation.
* Utility functions toBinary() and fromBinary() make possible to use btoa() and atob()
* with UTF strings.
* The original example here:
* For additional information see:
* Usage example:
* > btoa(toBinary('☸☹☺☻☼☾☿'))
vladignatyev /
Created Mar 29, 2020
Python script to generate secure passwords
L = 12; import os; voc = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()'; print(''.join([voc[int.from_bytes(os.urandom(1), "big") % len(voc)] for i in range(L)]))
vladignatyev / PowerSet.swift
Created Mar 1, 2020
Combinatorics: Pure Swift 5 Power Set algorithm implementation. Returns power set elements (permutation), in ascending order from smaller to bigger subsets.
View PowerSet.swift
import Foundation
class PowerSetIterator<T> {
var sourceSet: [T]
var l: Int
var setlen: Int
var ones: [Int]
var lastDigit: Int?
var yield1: Bool
vladignatyev / powerset.js
Created Feb 29, 2020
Combinatorics: Good Power Set implementation in ECMAScript
View powerset.js
function *powerSet(sourceSet) {
function product(ones, sourceSet) {
let l = ones.length;
let out = new Array(l);
for (var i = 0; i < l; i++) {
out[i] = sourceSet[ones[i]]
return out;
vladignatyev /
Created Feb 29, 2020
Combinatorics: Pure Python Power Set algorithm implementation. Generator returns power set elements (permutation), in ascending order from smaller to bigger subsets.
Use `python -m doctest` for tests.
>>> ps = power_set([1,2,3])
>>> for ss in ps:
vladignatyev /
Created Feb 4, 2020
2020 Squares Puzzle: Privacy Policy

Words in short...

We take your privacy and your rights seriously.

We believe the best, while having a lawful document that describe rules we follow. In short, our apps may collect some of your personal data, but mostly technical data (ad IDs, analytics IDs) that can not be associated with you personally. You can easily remove such data from your phone by removing our apps. We don't associate this data with your personality.

Our apps may collect such information on behalf of the following third-parties:

  • Google Analytics
  • Google Firebase
vladignatyev / woof.js
Created Dec 15, 2019
TIC-80: Playing with peek/poke DMA, sound and graphics. UI with mouse-draggable handles!
View woof.js
// title: Pixel Woof
// author: Vladimir Ignatev
// desc: Music Toy
// script: js
var t=0
var x=96
var y=24
var waves = [];
vladignatyev /
Created Mar 19, 2019
Minimalistic Python 2 Multithread Portscan Tool
import sys
import socket
import errno
import threading
import time
from threading import Thread
class Worker(Thread):
def __init__(self, host, ports):
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZxJjCtJ4GMg/nDDeDhHUb69pWXUshWA0HMyQtZpS/tUfy+yDHQtgE+m5PtK3wg2FuE2gFa68xSxFQuGFE+dDfXgiQ0tnEgxnWuoJ8Xf2BhMlpqrktDnuZ3VrooeiwY0dpzdQebHxOEofuKcSt/QKY6V5+HZzvqlcRSth8ZhZWxTsf3moVmx6JUIe8wa5XiZKoKIgfq6Oqygs07YaCH8dUIUkoQnoqb7AwXHIuSf/izwdhkXak8evRYv3+vyFrd+FiB0ffcbjzP0QMTRjrYiURWNtOKCHYupi3PWlSgYbhTv22MYdNioR4hbsRyGawwlVtpfiWJxxs+NzAbYen8Rfz