Skip to content

Instantly share code, notes, and snippets.

Avatar
🗿
мы ВАЙБИН здесь

Alexander Pushkov notpushkin

🗿
мы ВАЙБИН здесь
View GitHub Profile
View ee-startup-visa-questionnaire.md

These are the questions asked when you apply for an Estonian Startup Visa program.

Intro

Welcome to Startup Committee. You will be guided through the application process.

If you already have a company profile in Startup Includer, it will take only few clicks to share the data.

View starting-owlink.sh
View waitForPopupClosed.js
function waitForPopupClosed(popup) {
return new Promise((resolve, reject) => {
const popupTick = setInterval(function() {
if (popup.closed) {
clearInterval(popupTick);
resolve();
}
}, 500);
});
}
View gist:1ebd2cc6989a68bd93f09831bb7172fe
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: dick = {'test1': {1,2,3,4,5,}, 'test2': {6,5,2,4,9,}, 'test3': {1, 4, 6, 9}}
In [2]: set.intersection?
Docstring:
Return the intersection of two sets as a new set.
@notpushkin
notpushkin / soundcloud-dl.md
Last active Aug 16, 2019
Manual SoundCloud track download
View soundcloud-dl.md
  1. Prepend https://api.soundcloud.com/resolve?client_id=8bcccc3476eaa137a084c9f0c041915f&url= to your track url
  2. You'll be redirected to track's API page, append /stream before ?client_id

For a more humane experience, try youtube-dl.

Powered by SoundCloud

View traefik-consul-swarm.sh
#!/bin/bash
# Based on https://dockerswarm.rocks/traefik/
# You have to have a docker swarm set up beforehand, try https://dockerswarm.rocks/ for an easy guide
read -p 'Domain: ' -rei "${DOMAIN:-$(hostname)}" DOMAIN; export DOMAIN
read -p 'Email: ' -rei "${EMAIL}" EMAIL; export EMAIL
read -p 'Traefik username: ' -rei "${USERNAME:-admin}" USERNAME; export USERNAME
HASHED_PASSWORD="$(openssl passwd -apr1)"; export HASHED_PASSWORD
read -p 'Consul replicas: ' -rei "${CONSUL_REPLICAS:-0}" CONSUL_REPLICAS; export CONSUL_REPLICAS
read -p 'Traefik replicas: ' -rei "${TRAEFIK_REPLICAS:-1}" TRAEFIK_REPLICAS; export TRAEFIK_REPLICAS
View github-star-button-rename.user.css
@-moz-document domain("github.com"), domain("gist.github.com") {
.btn[title^="Star "],
.btn[title^="Unstar "] {
font-size: 0;
height: 28px;
display: flex;
align-items: center;
border-radius: 3px;
}
View headless-android-setup.sh
# reboot to recovery and connect via adb shell:
twrp wipe system
twrp wipe data
twrp install /sdcard/lineage-*.zip
twrp remountrw
setprop persist.service.adb.enable 1
setprop persist.service.debuggable 1
setprop persist.sys.usb.config mtp,adb
View encyclopatia.user.css
/* ==UserStyle==
@name Clean style for Encyclopatia
@namespace encyclopatia@ale.sh
@version 1.0.0
@author Alexander Pushkov (hey@ale.sh)
==/UserStyle== */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("encyclopatia.ru") {
View netlify_to_geoscaling.py
#!/usr/bin/env python3
"""
This script will move all your current Netlify zones to GeoScaling DNS2.
Netlify records would be stored as Smart Subdomains, resolving to a CNAME
everywhere except for Russia, where it will resolve to a known Netlify IP
not blocked by Roskomnadzor. Everything else will be stored as simple
records.
Please study http://www.geoscaling.com/ carefully before proceeding.
After migrating, you'll need to update your nameservers in your