-
Install Node.js.
-
Install Visual Studio Code.
-
While you're at it, also install the
code
command. -
Open the terminal.
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 | |
pg_dump \ | |
--data-only \ | |
--inserts \ | |
\ | |
--dbname=DBNAME \ | |
--host=HOST \ | |
--port=PORT \ | |
--username=USERNAME \ |
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 | |
pg_dump \ | |
--schema-only \ | |
--no-owner \ | |
--no-privileges \ | |
--no-publications \ | |
--no-subscriptions \ | |
--no-tablespaces \ | |
\ |
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
# ... | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \[\033[01;33m\]$(__git_ps1 "(%s)")\n\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "(%s)")\n\$ ' | |
fi | |
# ... |
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 addThrottledEventListener = (target, type, listener, delay = 67) => { | |
let timeoutId; | |
const throttler = event => { | |
if (!timeoutId) { | |
timeoutId = setTimeout(() => { | |
timeoutId = null; | |
listener(event); | |
}, delay); | |
} | |
}; |
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
import cv2 as cv | |
import numpy as np | |
def unsharp_mask(image, kernel_size=(5, 5), sigma=1.0, amount=1.0, threshold=0): | |
"""Return a sharpened version of the image, using an unsharp mask.""" | |
# For details on unsharp masking, see: | |
# https://en.wikipedia.org/wiki/Unsharp_masking | |
# https://homepages.inf.ed.ac.uk/rbf/HIPR2/unsharp.htm | |
blurred = cv.GaussianBlur(image, kernel_size, sigma) | |
sharpened = float(amount + 1) * image - float(amount) * blurred |
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
import cv2 as cv | |
import numpy as np | |
def y_grayscale(rgb_image): | |
"""Return a grayscale version of the RGB image, using the Y channel of the YCbCr color space.""" | |
# For details on the YCbCr color space, see: | |
# https://en.wikipedia.org/wiki/YCbCr | |
# https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf | |
return (.299 * rgb_image[:, :, 0] + | |
.587 * rgb_image[:, :, 1] + |