Skip to content

Instantly share code, notes, and snippets.

Nezteb / Dockerfile
Created June 7, 2023 01:01
Deploying Conduit (Matrix homeserver built in Rust) on
View Dockerfile
FROM matrixconduit/matrix-conduit:next-bullseye
# Set to false after making your first admin user
lleyton /
Last active June 7, 2023 13:33
(ENG) Open Source Business Challenges and Reality, Rui Ueyama

Open Source Business Challenges and Reality

Original Japanese note here.

Original Author: Rui Ueyama (creator of the mold linker)

Translated by @windowsboy111

Minimally edited by @lleyton

View NodeJS Interview

Interview Questions


Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.


jrc03c / download-canvas-as-image.js
Created February 13, 2020 15:10
Download the contents of an HTML5 canvas as an image
View download-canvas-as-image.js
function downloadCanvasAsImage(canvas, filename){
let a = document.createElement("a")
a.href = canvas.toDataURL() = filename
a.dispatchEvent(new MouseEvent("click"))
usayamadx / ExportKindle.js
Last active June 7, 2023 13:32 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
View ExportKindle.js
// init
let xhr = new XMLHttpRequest()
let domain = ''
let items = []
let csvData = ""
// function
function getItemsList(paginationToken = null) {
let url = domain + 'kindle-library/search?query=&libraryType=BOOKS' + ( paginationToken ? '&paginationToken=' + paginationToken : '' ) + '&sortType=recency&querySize=50''GET', url, false)
zchee / actionlist.vim
Last active June 7, 2023 13:28
IdeaVim actionlist
View actionlist.vim
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
mareksuscak /
Created March 15, 2015 12:56
Bump version shell script.
# Thanks goes to @pete-otaqui for the initial gist:
# Original version modified by Marek Suscak
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"
zilongshanren /
Created March 28, 2019 01:15 — forked from mrkpatchaa/
Git command to export only changed files between two commits

Use case : Imagine we have just created a project with composer create-project awesone-project (currently V0.2). 2 weeks later, there is a new release (V0.3). How to update your project ? Since composer update only updates the project dependencies, it is not what we are looking for. Composer doesn't know about awesome-project since it's not in our composer.json.

After trying many git solutions, I've come to this :

git archive HEAD $(git diff --name-only SHA1 SHA2 --diff-filter=ACMRTUXB)

This command will check for changes between the two commits and ignore deleted files.

nikhita /
Created April 26, 2020 15:41
gtk: "No protocol specified" error on Linux as root user

GTK protocol error


If you are running as a root user while opening a GTK session on Linux i.e. using sudo, su, etc, you might encounter errors like:

No protocol specified
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/ GtkWarning: could not open display
 warnings.warn(str(e), _gtk.Warning)
martinbutt /
Created March 27, 2022 20:32
Install Express VPN on ARM64 Gemini PDA Debian 9 (Gemian Linux)

Configure system to allow installation of armhf (32-bit) packages

sudo dpkg --add-architecture armhf
sudo apt-get update

Change [arch=arm64] to [arch=arm64,armhf] in all locations

sudo vi /etc/apt/sources.list.d/multistrap-debian.list

Install the cross compatibility libraries