Skip to content

Instantly share code, notes, and snippets.

View repcsi's full-sized avatar

repcsi repcsi

View GitHub Profile
@repcsi
repcsi / mpv-ipcam-monitor.sh
Created May 12, 2020 08:03 — forked from paius1/mpv-ipcam-monitor.sh
Script to view and Monitor rtsp:// stream from a security camera
#!/usr/bin/env bash
#
# Simple script to monitor a ipcam stream running on mpv
# using the ipc-server
# requires mpv, socat, and jq written for bash 4
# xwinwrap to run on the Desktop
# by gmail plgroves 2019
#
# script creates a kill script in same path as this script
# named This_script-kill
@repcsi
repcsi / postgres-best-practices.md
Created February 13, 2021 17:12 — forked from kyledcline/postgres-best-practices.md
Postgres Best Practices

PSQL CLI Client

Psql is a fully-fledged CLI client for Postgres, but most people are unaware of its many advanced features.

~/.psqlrc can be edited to persist any behavior or configuration settings you want between psql sessions. It behaves just like ~/.bashrc or ~/.vimrc, sourced at psql launch. See More out of psql for some interesting configurations.

If you have a long query to write and rewrite, you can use \e to edit your query in an editor.

Use \watch at the end of a query in order to automatically re-run the query every few seconds - great for monitoring while making changes elsewhere in your application architecture.

@repcsi
repcsi / powerOutage.cpp
Created June 30, 2021 08:44 — forked from krdarrah/powerOutage.cpp
Particle Boron Power Outage Detector
String str1,str2;
bool onUSB = false;
bool onBattery = false;
bool lowBattery = false;
unsigned long pwrCheckTimeStart;//to check power every 10sec
void setup() {
// INITIAL POWER CHECK
int powerSource = System.powerSource();