mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
vim ~/.profile # add this line:
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
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
# This is the mount script I have been using for my crypt drive. | |
# So far, these settings have been stable enough to use as a library source in Plex. | |
# | |
# start/enable this unit passing the remote name ("instance") you want to mount. | |
# example: sudo systemctl start rc-mount@gcrypt.service #instance is "gcrypt" | |
# instance needs to be defined in your rclone.conf | |
# | |
# Assuming: | |
# rclone is located at /usr/bin/rclone | |
# |
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 [ $# -lt 3 ] | |
then echo "expecting 3 numaric prams: # goal size in GB, # amount complete in GB, # speed in MB/s" | |
exit 1 | |
fi | |
goal=$1 | |
sofar=$3 | |
speed=$2 | |
onegbmb=1024 |
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
#!/bin/bash | |
if [ "$UID" != "0" ] | |
then | |
echo "You have to be root" >&2 | |
exit 1 | |
fi | |
CHROOT=$1 |
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
Open with env var MOZ_USE_XINPUT2 from command line | |
$ MOZ_USE_XINPUT2=1 /usr/bin/firefox | |
This gives us multifouch zooming (albeit a bit clunky). It also seems to add some memory issues with | |
the display of fonts. If you see random bold / blurry / jagged head over to preferences and search | |
for "smooth" and uncheck "Use smooth scrolling" | |
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
FROM plexinc/pms-docker:plexpass | |
RUN apt-get update && apt-get install software-properties-common -y | |
RUN add-apt-repository -y ppa:linuxgndu/sqlitebrowser | |
RUN apt-get update && apt-get install sqlitebrowser -y |
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
FROM gcr.io/cloudshell-images/cloudshell:latest | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update && apt-get install yarn -y | |
# Add your content here | |
# To trigger a rebuild of your Cloud Shell image: | |
# 1. Commit your changes locally: git commit -a | |
# 2. Push your changes upstream: git push origin master |
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
#!/bin/bash | |
# int_ = not exported | |
# COLOR CODES https://en.wikipedia.org/wiki/ANSI_escape_code | |
NC='\033[0m' | |
BLUE='\033[0;34m' | |
int_selectHeader() { | |
printf "Select a subfolder of ${BLUE}$1${NC}:" | fold -s -w 80 | |
echo |
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
#!/bin/bash | |
. /usr/local/bin/myFunctions.sh | |
SRCDIR="/downloads/completed" | |
DESTDIR="/backup" | |
############################################################################### | |
# goto in bash https://bobcopeland.com/blog/2012/10/goto-in-bash/ | |
function jumpto | |
{ | |
label=$1 | |
cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$') |
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
#! /bin/bash | |
echo "starting syncing $1 to $2" | |
rsync -r -vh --append-verify --no-compress --info=progress2 --out-format='[%t] [%i] (Last Modified: %M) (bytes: %-10l) %-100n' $1 $2 | |
echo "completed" |