start new:
tmux
start new with session name:
tmux new -s myname
| // monospaced extension | |
| // usage: object.font = object.font.monospacedDigitFont | |
| import UIKit | |
| extension UIFont { | |
| var monospacedDigitFont: UIFont { | |
| let oldFontDescriptor = fontDescriptor | |
| let newFontDescriptor = oldFontDescriptor.monospacedDigitFontDescriptor |
| #!/bin/bash | |
| # - lcoation: https://goo.gl/DjOxoq | |
| # - download: wget https://goo.gl/DjOxoq (this is the .sh file) | |
| # - execute: bash <(curl -s https://gist.githubusercontent.com/RickyVaughn2/d3329bf33529d25bfa6065a2fefce348/raw/1eeb496a42544a6af754cafa373bea678c8cf1b6/basicNodeMQTT.sh) | |
| echo **--** | |
| sudo apt update | |
| sudp apt -y upgrade | |
| #!/bin/bash | |
| # - lcoation: https://goo.gl/DjOxoq | |
| # - download: wget https://goo.gl/DjOxoq (this is the .sh file) | |
| # - execute: bash <(curl -s https://gist.githubusercontent.com/RickyVaughn2/d3329bf33529d25bfa6065a2fefce348/raw/1eeb496a42544a6af754cafa373bea678c8cf1b6/basicNodeMQTT.sh) | |
| echo **--** | |
| sudo apt update | |
| sudp apt -y upgrade |
| #!/bin/bash | |
| #sudo visudo | |
| #username ALL=(ALL) NOPASSWD:ALL | |
| # - mosquitto | |
| sudo apt install mosquitto -y | |
| sudo apt install mosquitto-clients -y | |
| # - node |
| #!/bin/bash | |
| ################################ | |
| # OS X Install ISO Creater # | |
| # # | |
| # Author: rickyvaughn2 # | |
| ################################ | |
| #usage: | |
| #cd ~/Desktop |
| var mqtt = require('mqtt'); | |
| var Topic = '#'; //subscribe to all topics | |
| var Broker_URL = 'mqtt://192.168.1.123'; | |
| var Database_URL = '192.168.1.123'; | |
| var options = { | |
| clientId: 'MyMQTT', | |
| port: 1883, | |
| //username: 'mqtt_user', | |
| //password: 'mqtt_password', |
| # Change the Terminal Font | |
| sudo vi /etc/default/console-setup | |
| # set FONTFACE="Terminus" | |
| # set FONTSIZE="16x32" | |
| # Useful apt commands | |
| sudo apt-get install -s git # simulate | |
| apt-cache show git # package info | |
| apt-cache show git | grep '^Size' # size only | |
| apt-get install [package] --no-install-recommends --show-progress # don't install recommended packages |
| # update | |
| apt-get update && apt-get upgrade -y | |
| # set timezone to cst | |
| echo "America/Chicago" > /etc/timezone | |
| dpkg-reconfigure -f noninteractive tzdata | |
| # uncomment to enable the firewall and poke holes for ssh and mysql | |
| #ufw enable | |
| #ufw allow 22 |
| sudo apt install curl | |
| curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo npm install -g --unsafe-perm node-red | |
| sudo npm install -g node-red-admin | |
| sudo npm install -g pm2 | |
| pm2 start /usr/bin/node-red -- -v | |
| pm2 save |