This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Before setTimeout\n"); | |
setTimeout((): void => { | |
// prints out "2", meaning that the callback is not called immediately after 500 milliseconds. | |
console.log("Inside 'setTimeout' callback\n"); | |
}, 1000); | |
console.log("After 'setTimeout'\n"); |
# This is how piping a file into a container could be done for a build.
# The container’s ID will be printed after the build is done and the build logs
# could be retrieved using docker logs. This is useful if you need to pipe a
# file or something else into a container and retrieve the container’s ID once
# the container has finished running.
#
# See https://docs.docker.com/engine/reference/commandline/run/#attach-to-stdinstdoutstderr--a
$ date | docker run -i -a stdin debian:buster sh -c 'printf "%s\\n" "Hello world $@" && cat -'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
st-mono| simpleterm monocolor, | |
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, | |
am, | |
bce, | |
bel=^G, | |
blink=\E[5m, | |
bold=\E[1m, | |
cbt=\E[Z, | |
cvvis=\E[?25h, | |
civis=\E[?25l, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# vim: noexpandtab:softtabstop=0: | |
# | |
# wm independent hotkeys | |
# | |
# suckless' simple terminal emulator | |
super + Return | |
st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vim: ft=sh: | |
# Obtained from | |
# https://betterdev.blog/minimal-safe-bash-script-template/ | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const generateRange = rangeLength => Array.from({ length: rangeLength }, (_,i) => i); | |
console.log(generateRange(20)); | |
[ | |
0, 1, 2, 3, 4, 5, 6, | |
7, 8, 9, 10, 11, 12, 13, | |
14, 15, 16, 17, 18, 19 | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> | |
<title>Error 404 (Not Found)</title> | |
<style> | |
html { | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
fdisk -l 2020-08-20-raspios-buster-arm64.img | |
### Example Output | |
# Disk 2020-08-20-raspios-buster-arm64.img: 3.5 GiB, 3779067904 bytes, 7380992 sectors | |
# Units: sectors of 1 * 512 = 512 bytes | |
# Sector size (logical/physical): 512 bytes / 512 bytes | |
# I/O size (minimum/optimal): 512 bytes / 512 bytes |
NewerOlder