Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active November 16, 2024 19:12
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@Floofies
Floofies / promiseFilter.js
Last active September 9, 2022 11:28
Returns a Promise which resolves with a new Array, containing only values which passed the test.
/**
* promiseFilter - Returns a Promise which resolves with a new Array, containing only values which passed the test.
* @param {Array} array An Array from which to filter values into a new Array.
* @param {callback} test A callback function which must return a Promise, which must resolve with a Boolean.
* @callback test
* @param {any} value The current value from `array`.
* @param {Number} index The current index being used to access `array`.
* @param {Array} array The Array being iterated through, `array`.
* @returns {Promise} A Promise which resolves with a new Array containing values which passed the test.
*/
@luuuis
luuuis / pre-commit.sh
Last active September 19, 2021 16:18 — forked from dahjelle/pre-commit.sh
Pre-commit hook for eslint, linting *only* staged changes.
#!/usr/bin/env bash
set -uo pipefail
IFS=$'\n\t'
#
# Improvements from dahjelle/pre-commit.sh:
# - does not lint deleted files,
# - lints all staged files before exiting with an error code,
# - handles spaces and other unusual chars in file names.
#
@fnky
fnky / ANSI.md
Last active November 17, 2024 17:38
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27