Skip to content

Instantly share code, notes, and snippets.

View repcsi's full-sized avatar

repcsi repcsi

View GitHub Profile
@repcsi
repcsi / opensuse_upgrade.dup
Created September 2, 2021 20:39
opensuse dup
Make sure that you modded the repos to use the releasever variable:
# zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.
# | Alias | Name | Enabled | GPG Check | Refresh
--+-----------------------------------+---------------------------------------------------------------------------------------------+---------+-----------+--------
1 | leap-${releasever} | leap-${releasever} | Yes | (r ) Yes | No
2 | leap-${releasever}-update | leap-${releasever}-update | Yes | (r ) Yes | No
3 | leap-${releasever}-update-non-oss | leap-${releasever}-update-non-oss | Yes | (r ) Yes | No
4 | repo-backports-debug-update | Updat
They changed VCS to git at last :D
svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src
git clone -o freebsd https://git.FreeBSD.org/src.git /usr/src
git checkout releng/13.0
# git branch
main
* releng/13.0
@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();
@repcsi
repcsi / gist:1eabd06b8dd47efecec3421d23b6604a
Created May 24, 2021 20:03
pycharm + django .gitignore
#pycharm related stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/**/inspectionProfiles
# Sensitive or high-churn files
.idea/**/dataSources/
@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.

---
- hosts: slestest
vars:
remote_user: root
sssd_filename: /etc/sssd/sssd.conf
ldap_conf_filename: /etc/ldap.conf
tasks:
- name: sssd file set audit off
lineinfile: dest={{ sssd_filename }}
backup=yes
@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
old kernels:
Vanila:
## dnf repoquery set negative --latest-limit ##
## as how many old kernels you want keep ##
dnf remove $(dnf repoquery --installonly --latest-limit=-2 -q)
YUM-UTILS:
## CentOS, Red Hat (RHEL) ##
yum install yum-utils
Prusa Mesh Level (didn't change - used default):
G28 W ; home all without mesh bed level
G80 ; mesh bed leveling
G81 ; check mesh leveling results
OctoPi:
network={
ssid="Your Wifi SSID"
psk="supersecretwifipassword"
}
==========================================================
RASPBIAN:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1