Skip to content

Instantly share code, notes, and snippets.

View 43trh's full-sized avatar
🎯
Focusing

43trh 43trh

🎯
Focusing
View GitHub Profile
@43trh
43trh / bundle.js
Created July 3, 2025 20:30 — forked from jackgill/bundle.js
A node.js script to create a bundle containing an npm package, and all of its dependencies.
/*
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
*
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
@43trh
43trh / Alpine_Linux_minirootfs_install.md
Created June 1, 2025 22:29 — forked from lidgnulinux/Alpine_Linux_minirootfs_install.md
Install Alpine Linux Via Minirootfs Archive.

Install Alpine Linux Via Minirootfs Archive.

Prerequisites.

  • Any live usb bootable.
  • Alpine Linux minirootfs archive, we can get it here. We can choose alpine-minirootfs-3.20.2-x86_64.tar.gz.
  • Some partitions, for root system (/), efi (if you have uefi machine) and swap (optional).
  • Basic commandline knowledge.

Steps.

@43trh
43trh / .block
Created April 24, 2025 02:54 — forked from tompiler/.block
Zoomable candlestick chart
license: mit
@43trh
43trh / count-pypi-packages-with-whl.js
Created April 16, 2025 09:58 — forked from josephrocca/count-pypi-packages-with-whl.js
Count PyPI packages that currently include a downloadable .whl file
// Paste this in dev tools console at pypi.org to get the percentage of packages in the top 4000 (cccording to this list:https://hugovk.github.io/top-pypi-packages/) that have a downloadable .whl file.
// to get latest list:
//let topPythonPackages = await fetch("https://hugovk.github.io/top-pypi-packages/top-pypi-packages-365-days.min.json").then(r => r.json());
//topPythonPackages = topPythonPackages.rows.map(r => r.project);
// list from April 2021:
let topPythonPackages = ["urllib3","six","botocore","setuptools","requests","certifi","idna","python-dateutil","s3transfer","chardet","pyyaml","pip","boto3","docutils","jmespath","rsa","pyasn1","wheel","numpy","pytz","awscli","cffi","colorama","protobuf","markupsafe","jinja2","attrs","cryptography","pycparser","requests-oauthlib","oauthlib","importlib-metadata","zipp","pandas","click","pyparsing","packaging","pyasn1-modules","google-auth","cachetools","future","decorator","futures","google-api-core","jsonschema","scipy","pygments","werkzeug","pyrsistent","pil
h1 {
font-size: 1.25em;
}
h2 {
font-size: 1.125em;
}
h3 {
font-size: 1.05em;
h1 {
font-size: 1.25em;
}
h2 {
font-size: 1.125em;
}
h3 {
font-size: 1.05em;

Reference: List of iOS App URL Scheme Names & Paths for Shortcuts

Author:

Saved on: 2021-03-19, 15:52

If you've ever customized your app icons or played around with Shortcuts (previously called Workflow), you probably know how important URL scheme names are. Nearly all iOS apps assign themselves one of these names, and you need to know them if you want to add custom icons to your home screen or create a Shortcuts workflow that opens an app on your iPhone up. Finding the URL scheme name, also known as a URI scheme, for a particular app is not easy. First, you have to download the IPA file for the app — a difficult task since the iTunes 12.7 update removed iOS apps from it. When you finally find the IPA, you have to turn it into a ZIP file, show the contents of the app package, then hunt for the specific PLIST file that contains the URL schemes. It's a lot of work.

This example

@43trh
43trh / .gitignore
Created March 30, 2025 20:58 — forked from jeosadn/.gitignore
Convert YouTube subscriptions exported via Google Takeout into OPML
*~
@43trh
43trh / touchmove-mouseover-simulation.md
Created March 26, 2025 02:32 — forked from VehpuS/touchmove-mouseover-simulation.md
Simulating Javascript mouseover events on touch screens using touchmove attributes and document.elementFromPoint

I made an HTML port of game of life made with a table of checkboxes based on Pluralsight's Play by Play: HTML, CSS, and JavaScript with Lea Verou (http://www.pluralsight.com/courses/play-by-play-lea-verou). I was able to create a cool mousedown interface that allowed the "player" to draw on the board by dragging the mouse while it was down, and wanted to do the same for touch devices.

Unfortunately, touch events only hold references to the DOM element where they began (i.e. where "touchstart" fired) and do not recognize the DOM elements that exist under them (a detailed explanation for this can be found here: http://stackoverflow.com/questions/4550427/prefered-alternative-to-onmouseover-for-touch).

Instead, touch events maintain several lists of Touch objects - which represent interactions with the touch screen. Among these objects' properties are clientX and clientY, which indicate the X and Y coordinates of the events relative to the viewport (go to http://www.javascriptkit.com/javatutors/touchevents.shtm