Skip to content

Instantly share code, notes, and snippets.

@Nezteb
Nezteb / Dockerfile
Created June 7, 2023 01:01
Deploying Conduit (Matrix homeserver built in Rust) on Fly.io
View Dockerfile
# https://gitlab.com/famedly/conduit/-/blob/next/docker/README.md
# https://gitlab.com/famedly/conduit/-/blob/next/Dockerfile
# https://hub.docker.com/r/matrixconduit/matrix-conduit
FROM matrixconduit/matrix-conduit:next-bullseye
ENV CONDUIT_SERVER_NAME="my.domain.com"
ENV CONDUIT_DATABASE_BACKEND="rocksdb"
# Set to false after making your first admin user
@lleyton
lleyton / translation.md
Last active June 7, 2023 13:33
(ENG) Open Source Business Challenges and Reality, Rui Ueyama
View translation.md

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 Questions.md

Interview Questions

Node.js

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.

Source: tutorialspoint.com

@jrc03c
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()
a.download = filename
a.dispatchEvent(new MouseEvent("click"))
}
@usayamadx
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 = 'https://read.amazon.com/'
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'
xhr.open('GET', url, false)
@zchee
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>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@mareksuscak
mareksuscak / bump-version.sh
Created March 15, 2015 12:56
Bump version shell script.
View bump-version.sh
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# 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
zilongshanren / git-export-changes-between-two-commits.md
Created March 28, 2019 01:15 — forked from mrkpatchaa/git-export-changes-between-two-commits.md
Git command to export only changed files between two commits
View git-export-changes-between-two-commits.md

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 --output=changes.zip 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
nikhita / gtk-protocol-linux.md
Created April 26, 2020 15:41
gtk: "No protocol specified" error on Linux as root user
View gtk-protocol-linux.md

GTK protocol error

Problem

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/__init__.py:57: GtkWarning: could not open display
 warnings.warn(str(e), _gtk.Warning)
@martinbutt
martinbutt / INSTALL.md
Created March 27, 2022 20:32
Install Express VPN on ARM64 Gemini PDA Debian 9 (Gemian Linux)
View INSTALL.md

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