Skip to content

Instantly share code, notes, and snippets.

@vladignatyev
vladignatyev / powerset.js
Created February 29, 2020 19:28
Combinatorics: Good Power Set implementation in ECMAScript
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
vladignatyev / power_set.py
Created February 29, 2020 18:18
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 power_set.py` for tests.
Usage:
>>> ps = power_set([1,2,3])
>>> for ss in ps:
print(ss)
Output:
[],
[1],
@vladignatyev
vladignatyev / privacy.md
Created February 4, 2020 16:36
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
vladignatyev / woof.js
Created December 15, 2019 21:15
TIC-80: Playing with peek/poke DMA, sound and graphics. UI with mouse-draggable handles!
// title: Pixel Woof
// author: Vladimir Ignatev
// desc: Music Toy
// script: js
var t=0
var x=96
var y=24
var waves = [];
@vladignatyev
vladignatyev / portscan.py
Created March 19, 2019 14:58
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):
@vladignatyev
vladignatyev / id_rsa.pub
Created February 18, 2019 18:11
My SSH pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZxJjCtJ4GMg/nDDeDhHUb69pWXUshWA0HMyQtZpS/tUfy+yDHQtgE+m5PtK3wg2FuE2gFa68xSxFQuGFE+dDfXgiQ0tnEgxnWuoJ8Xf2BhMlpqrktDnuZ3VrooeiwY0dpzdQebHxOEofuKcSt/QKY6V5+HZzvqlcRSth8ZhZWxTsf3moVmx6JUIe8wa5XiZKoKIgfq6Oqygs07YaCH8dUIUkoQnoqb7AwXHIuSf/izwdhkXak8evRYv3+vyFrd+FiB0ffcbjzP0QMTRjrYiURWNtOKCHYupi3PWlSgYbhTv22MYdNioR4hbsRyGawwlVtpfiWJxxs+NzAbYen8Rfz ya.na.pochte@gmail.com
@vladignatyev
vladignatyev / id_rsa.pub
Created October 18, 2018 07:37
My pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZxJjCtJ4GMg/nDDeDhHUb69pWXUshWA0HMyQtZpS/tUfy+yDHQtgE+m5PtK3wg2FuE2gFa68xSxFQuGFE+dDfXgiQ0tnEgxnWuoJ8Xf2BhMlpqrktDnuZ3VrooeiwY0dpzdQebHxOEofuKcSt/QKY6V5+HZzvqlcRSth8ZhZWxTsf3moVmx6JUIe8wa5XiZKoKIgfq6Oqygs07YaCH8dUIUkoQnoqb7AwXHIuSf/izwdhkXak8evRYv3+vyFrd+FiB0ffcbjzP0QMTRjrYiURWNtOKCHYupi3PWlSgYbhTv22MYdNioR4hbsRyGawwlVtpfiWJxxs+NzAbYen8Rfz ya.na.pochte@gmail.com
@vladignatyev
vladignatyev / gdpr-list.md
Last active October 1, 2018 07:44
List of countries affected by GDPR
@vladignatyev
vladignatyev / testdevice.js
Created May 27, 2018 13:51
Get hardware data from Browser to implement vendor and hardware lock like Google and other shit companies do
console.log("CPU/OS: " + navigator.oscpu);
console.log("Cores count: " + navigator.hardwareConcurrency);
console.log("RAM: " + navigator.deviceMemory);
console.log("Plaform: " + navigator.platform);
console.log("Browser info: " + navigator.userAgent);
console.log("Browser info: " + navigator.product + " " + navigator.productSub);
console.log("Browser info: " + navigator.appCodeName);
console.log("Browser info: " + navigator.appName);
console.log("Browser info: " + navigator.appVersion);
console.log("Vendor: " + navigator.vendor + " " + navigator.vendorSub);
@vladignatyev
vladignatyev / ListAdapter.kt
Created May 21, 2018 12:50
Kotlin + Anko + ButterKnife: helper for async adapter for ListView
package com.github.kotlin.lib
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
import butterknife.ButterKnife