This file contains hidden or 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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
This file contains hidden or 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 | |
LOGFILE=./cctv_restart.log | |
NOW=$(date +%d%m%Y-%M:%S) | |
OUTPUT=$(displaycameras restart) | |
echo "Restarted @ "$NOW >> $LOGFILE 2>&1 |
This file contains hidden or 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
# Setup VNC server | |
sudo apt-get install -y tightvncserver | |
mkdir -p "$HOME/.vnc" | |
vncpasswd -f <<< $PASSWORD > "$HOME/.vnc/passwd" | |
# VNC at startup | |
sudo tee /etc/init.d/tightvnc > /dev/null <<EOF | |
#!/bin/sh |
This file contains hidden or 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
# To mount remote directory: | |
sshfs <username>@<remote_host>:<remote_directory> <mountpoint> | |
# To unmount remote directory: | |
umount <mountpoint> | |
# To mount remote directory from server with specific port: | |
sshfs <username>@<remote_host>:<remote_directory> -p <2222> | |
# To use compression: |
This file contains hidden or 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
[ | |
{ | |
"id": "build", | |
"execute-command": "/quasar-build.sh", | |
"command-working-directory": "/src" | |
} | |
] | |
This file contains hidden or 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 | |
ANDROID_HOME=$1 | |
check_android_home() { | |
if [ "$#" -lt 1 ]; then | |
if [ -z "${ANDROID_HOME}" ]; then | |
echo "Please either set ANDROID_HOME environment variable, or pass ANDROID_HOME directory as a parameter" | |
exit 1 | |
else | |
ANDROID_HOME="${ANDROID_HOME}" |
This file contains hidden or 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 node | |
var fs = require("fs"), | |
path = require("path"); | |
var rootdir = process.argv[2]; | |
if (rootdir) { | |
module.exports = function(context) { |
This file contains hidden or 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
##------------------------------------ ## | |
# -- new-alias -- # | |
# creates new alias & writes to file # | |
# $1 = alias new # | |
# $2 = alias definition # | |
##------------------------------------ ## | |
new-alias () { | |
if [ -z "$1" ]; then | |
echo "alias name:" | |
read NAME |
This file contains hidden or 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains hidden or 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 | |
: ' Script that enables TLS for Docker service in Ubuntu 16.x | |
This script is intended to be run as root | |
It; | |
- Generates the keys | |
- Creates the daemon.json Docker config file |