Skip to content

Instantly share code, notes, and snippets.

@noraj
noraj / gulp-cjs-to-esm.md
Last active April 18, 2024 12:13
Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Context

del v7.0.0 moved to pure ESM (no dual support), which forced me to move my gulpfile to ESM to be able to continue to use del.

The author sindresorhus maintains a lot of npm packages and does not want to provides an upgrade guide for each package so he provided a generic guide. But this guide is a bit vague because it's generic and not helping for gulp, hence this guide.

Guide

@mmngreco
mmngreco / py2mermaid.py
Last active April 18, 2024 12:10
[mermaid] classDiagram builder from python code
r"""
This requires to have the library (pkg) pre-installed.
Usage:
$ python ./py2mermaid.py --pkg pandas
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g"
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121
@CaptainVincent
CaptainVincent / README.md
Last active April 18, 2024 12:08
Improve your vscode quickinput-widget

Customize your quickinput-widget

This is a small tool designed to emulate the Sublime style Command Palette as follows.

Screenshot

It requires the use of a specific extension to load the js file from this gist.

I'm using the APC extension, and the usage is as follows.

@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 18, 2024 12:07
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
Hex ChainId (Decimal) Network
0x1 1 Ethereum Main Network (Mainnet)
0x3 3 Ropsten Test Network
0x4 4 Rinkeby Test Network
0x5 5 Goerli Test Network
0x2a 42 Kovan Test Network
0xAA36A7 11155111 Sepolia Testnet
0x89 137 Polygon Main Network
0x13881 80001 Mumbai Test Network
0xA86A 43114 Avalanche C-Chain Main Network
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 18, 2024 12:05
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ThinGuy
ThinGuy / maas-build-debug-image.bash
Created March 20, 2024 03:30
Updated MAAS debug image, adds password for the root user in case of a bad networking configuration that results in the node being deployed is unable to contact the MAAS server to get its metadata.
maas-build-debug-image() {
local -a UBU_RELS=(bionic)
export IMG_PWD="Ubuntu1+"
# Create salted pw for images
printf "\e[2G - Salting the desired password of \x22${IMG_PWD}\x22 for use in debug-image\n"
export SALTED_PWD="$(echo 'Ubuntu1+'|mkpasswd --method=SHA-512 --rounds=4096 -s)"
# Dowload images
printf '%s\n' ${UBU_RELS[@]}|xargs -rn1 -P0 bash -c '
IMG_URL=https://cloud-images.ubuntu.com/${0}/current/${0}-server-cloudimg-amd64-root.tar.xz;
printf "\e[2G - Fetching Ubuntu release ${0^} from ${IMG_URL}\n"
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active April 18, 2024 12:04
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@ThinGuy
ThinGuy / demo-typer.sh
Last active April 18, 2024 12:04
Read a list of commands then make it look like you're typing in terminal, Use with termtosvg. asciinema, etc.
#!/bin/bash
[[ -f ~/script.cmds ]] || { printf "\nMissing $HOME/script.cmds. Exiting\n";exit 1; }
dprompt() { [[ $HOME = $(pwd) ]] && { local DIR='~'; } || { local DIR=$(pwd); };printf "\e[01;32m$USER@${HOSTNAME}\e[0m:\e[01;34m${DIR}\e[0m$ ";};export -f dprompt
clear
declare -ag DCMDS=()
export DCMD_CNT=${#DCMDS[@]}
while IFS= read -er C;do DCMDS+=("${C%;$*}");done < <(cat script.cmds)
export DCMD_CNT=${#DCMDS[@]}
for D in "${DCMDS[@]}";do dprompt;echo "${D}"|pv -qL 10;bash -c "${D}";done
This file has been truncated, but you can view the full file.
__label__2 Stuning even for the non-gamer: This sound track was beautiful! It paints the senery in your mind so well I would recomend it even to people who hate vid. game music! I have played the game Chrono Cross but out of all of the games I have ever played it has the best music! It backs away from crude keyboarding and takes a fresher step with grate guitars and soulful orchestras. It would impress anyone who cares to listen! ^_^
__label__2 The best soundtrack ever to anything.: I'm reading a lot of reviews saying that this is the best 'game soundtrack' and I figured that I'd write a review to disagree a bit. This in my opinino is Yasunori Mitsuda's ultimate masterpiece. The music is timeless and I'm been listening to it for years now and its beauty simply refuses to fade.The price tag on this is pretty staggering I must say, but if you are going to buy any cd for this much money, this is the only one that I feel would be worth every penny.
__label__2 Amazing!: This soundtrack is my favorite music of all