Skip to content

Instantly share code, notes, and snippets.

View RickyVaughn2's full-sized avatar
👾
KATN

Ricky Vaughn RickyVaughn2

👾
KATN
View GitHub Profile
@RickyVaughn2
RickyVaughn2 / monospaced.swift
Last active June 29, 2018 13:10
Swift 3 Monospaced UIFont Extension
// monospaced extension
// usage: object.font = object.font.monospacedDigitFont
import UIKit
extension UIFont {
var monospacedDigitFont: UIFont {
let oldFontDescriptor = fontDescriptor
let newFontDescriptor = oldFontDescriptor.monospacedDigitFontDescriptor
@RickyVaughn2
RickyVaughn2 / basicNodeMQTT.sh
Last active March 2, 2017 18:12
basicNodeMQTT.sh
#!/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
@RickyVaughn2
RickyVaughn2 / create_osx_iso.sh
Last active September 28, 2017 08:39
Create MacOS iso
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: rickyvaughn2 #
################################
#usage:
#cd ~/Desktop
@RickyVaughn2
RickyVaughn2 / tmux-cheatsheet.markdown
Created December 15, 2017 17:20 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@RickyVaughn2
RickyVaughn2 / app_mqtt_mysql.js
Created January 8, 2018 18:31 — forked from smching/app_mqtt_mysql.js
Node.js application: Store messages from Mosquitto MQTT broker into SQL Database
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',
@RickyVaughn2
RickyVaughn2 / dev.sh
Created February 4, 2018 00:17 — forked from rosswd/dev.sh
Dev setup guide for Raspberry Pi. Python, Virtualenv, Git and Terminal.
# 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
@RickyVaughn2
RickyVaughn2 / installMySQL80.sh
Last active May 3, 2018 19:43
Install MySQL 5.7 in non-interactive mode. Default root password will be "root".
# 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
@RickyVaughn2
RickyVaughn2 / setup.sh
Created February 19, 2019 23:20
basic nr
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