Skip to content

Instantly share code, notes, and snippets.

View Naramsim's full-sized avatar
Always in Christmas mood

Alessandro Pezzè Naramsim

Always in Christmas mood
View GitHub Profile
majal / minterpolate
Last active May 26, 2024 21:39 — forked from sgqy/
Multi-threaded minterpolate in ffmpeg
# Multicore minterpolate in ffmpeg
# Just slice & process & concat
# NB: The concat points between slices may be weird
# Default arguments
sgqy /
Last active May 20, 2023 16:58
multicore minterpolate in ffmpeg
### multicore minterpolate in ffmpeg
# just slice & process & concat
# the concat points between sliced may be weird, but it just works
# default args
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo:
package main
import (
# Autogenerated input type of AddComment
input AddCommentInput {
# A unique identifier for the client performing the mutation.
clientMutationId: String
# The Node ID of the subject to modify.
subjectId: ID!
# The contents of the comment.
body: String!
nhagen / PromisAllWithFails.js
Last active November 15, 2022 18:11
Wait until all promises have completed even when some reject, with Promise.all
var a = ["sdfdf", "http://oooooolol"],
handleNetErr = function(e) { return e };
Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr))
.then(function(sdf, invalid) {
console.log(sdf, invalid) // [Response, TypeError]
.catch(function(err) {
nkbt / .eslintrc.js
Last active May 11, 2024 13:03
Strict ESLint config for React, ES6 (based on Airbnb Code style)
"env": {
"browser": true,
"node": true,
"es6": true
"plugins": ["react"],
"ecmaFeatures": {
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
hsuh /
Last active October 16, 2015 18:44
screen spliting with screen

In screen the terminal multiplexer.

  • To split vertically: ctrl a then |.
  • To split horizontally: ctrl a then S (uppercase one).
  • To unsplit: ctrl a then Q (uppercase one).
  • To switch from one to the other: ctrl a then tab

Note: After splitting, you need to go into the new region and start a new session via ctrl a then c before you can use that area.

LeCoupa / nodejs-cheatsheet.js
Last active June 30, 2024 04:14
Complete Node.js CheatSheet --> UPDATED VERSION -->
/* *******************************************************************************************
* ******************************************************************************************* */
// 0. Synopsis.
Kartones /
Last active July 18, 2024 21:39
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)