Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
@notpushkin
notpushkin / docker-enhanced-manpages.py
Last active June 7, 2020 01:15
Enhanced manpage generator for Docker (WIP prototype)
#: Takes data from https://github.com/docker/docker.github.io/blob/master/_data/engine-cli/
#: and produces markdown suitable for conversion to a manpage (e. g. using pandoc).
template = lambda cmd: f"""
%docker-{cmd["command"].replace(" ", "-")}(1)
# NAME
docker {cmd["command"]} - {cmd["short"]}
# SYNOPSIS
diff --git a/node_modules/sapper/runtime/app.mjs b/node_modules/sapper/runtime/app.mjs
index 6dd39c7..602bfdf 100644
--- a/node_modules/sapper/runtime/app.mjs
+++ b/node_modules/sapper/runtime/app.mjs
@@ -356,7 +356,7 @@ async function hydrate_target(target)
}
function load_css(chunk) {
- const href = `client/${chunk}`;
+ const href = initial_data.baseUrl + `/client/${chunk}`;
@notpushkin
notpushkin / npmjs-explore.user.js
Last active April 6, 2021 21:21
Redirect from npm's Explore link to https://unpkg.com/browse/*/, which is available for all ✨
// ==UserScript==
// @name npmjs.com Explore → unpkg.com Browse
// @author Alexander Pushkov <alexander@notpushk.in>
// @version 2
// @grant none
// @include http://npmjs.com/package/*
// @include https://npmjs.com/package/*
// @include http://www.npmjs.com/package/*
// @include https://www.npmjs.com/package/*
// ==/UserScript==
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2020-03-31T18:03:46.844Z",
"redirects": [
{
"description": "Zoom → Zoom in-browser call",
"exampleUrl": "https://test.zoom.us/j/1234567890",
"exampleResult": "https://test.zoom.us/wc/join/1234567890",
"error": null,
"includePattern": "(https?://.*\\.zoom\\.us)/j/(.*)",
{
"createdBy": "Redirector v3.5.2",
"createdAt": "2020-03-21T16:18:21.901Z",
"redirects": [
{
"description": "Youtube → Invidious",
"exampleUrl": "https://www.youtube.com/watch?v=dvyZfa9x3UU",
"exampleResult": "https://invidio.us/watch?v=dvyZfa9x3UU",
"error": null,
"includePattern": "^https?://(?:www\\.)?youtube\\.com/(.*)$",

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.

function waitForPopupClosed(popup) {
return new Promise((resolve, reject) => {
const popupTick = setInterval(function() {
if (popup.closed) {
clearInterval(popupTick);
resolve();
}
}, 500);
});
}
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 April 3, 2022 17:47
Manual SoundCloud track download
  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