Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade
# https://forum.openwrt.org/t/swap-file-not-mounting-on-boot/10990/19
I had trouble mounting multiple swap FILES residing on different partitions but solved like this on the command line:
CREATE SWAP AS A FILE ON FIRST DISK DRIVE:
dd if=/dev/zero of=/mnt/sda1/swapfile bs=1M count=256
chmod 600 /mnt/sda1/swapfile
mkswap /mnt/sda1/swapfile
,#####
########### ########## #### ########## ############
&&&&########### ###* #### #### ### ##### ####
&&&&&&&&&######### ###, #### #### ### ### ####
&&&&& %%% ######## ############ #### ### ###, ####
.&& %%%% ###,,,,, ########/ #### ### #### ####
%%%%%/////,,,,,,,,,, ###, ##########, ############ ####
%%%%%%%/////////////***
///////////,
# unifi set-inform
*/5 * * * * /usr/bin/ssh [email protected] '/usr/bin/mca-cli-op set-inform http://192.168.10.250:8080/inform' > /dev/null 2>&1
*/5 * * * * /usr/bin/ssh [email protected] '/usr/bin/mca-cli-op set-inform http://192.168.10.250:8080/inform' > /dev/null 2>&1
*/5 * * * * /usr/bin/ssh [email protected] '/usr/bin/mca-cli-op set-inform http://192.168.10.250:8080/inform' > /dev/null 2>&1
*/5 * * * * /usr/bin/ssh [email protected] '/usr/bin/mca-cli-op set-inform http://192.168.10.250:8080/inform' > /dev/null 2>&1
# cctv office hours
0 8-17 * * * ffmpeg -i rtsp://192.168.10.95:554/onvif1 -vcodec copy -r 10 -t 3600 -y /home/kbeflo/Docker/Volumes/nextcloud/data/kbeflo/files/cctv/$(date +\%Y\%m\%d\%H).mp4
# cctv cleanup check every 10 days files older than 20 days
#!/bin/bash
echo "Provisioning box"
export DEBIAN_FRONTEND=noninteractive
echo "Setting up apt local mirror"
rm -rf /etc/apt/sources.list
rm -rf /etc/apt/sources.list.d
cat <<EOT >> /etc/apt/sources.list
deb [ arch=amd64 ] http://mirror.springvalley.tech/ubuntu/ bionic main restricted universe multiverse
deb [ arch=amd64 ] http://mirror.springvalley.tech/ubuntu/ bionic-security main restricted universe multiverse
@kleo
kleo / raspberry pi headless hidden wifi pass.txt
Last active November 8, 2020 16:16
raspberry pi headless hidden wifi pass
# Headless Raspberry Pi wifi ssh
Enable ssh
touch ssh
Generate WPA-PSK password
wpa_passphrase myaccesspoint
# reading passphrase from stdin
# Debian
sudo apt install xbindkeys xautomation
# ArchLinux
sudo pacman -S xbindkeys xorg-xev xdotool xautomation
xbindkeys --defaults > ~/.xbindkeysrc
vim ~/.xbindkeysrc
@kleo
kleo / nginx.conf
Created June 20, 2019 17:14 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@kleo
kleo / ddclient
Last active November 8, 2020 16:17
noip ddclient
https://medium.com/@nobuto_m/minimal-dynamic-dns-configuration-for-no-ip-com-with-ddclient-cb7c038a74be
use=web
ssl=yes
protocol=noip
login=<USERNAME>
password=<PASSWORD>
<YOUR_HOSTNAME>, <HOSTNAME2>, <HOSTNAME3>
# cat /etc/default/pveproxy
ALLOW_FROM="127.0.0.1"
DENY_FROM="all"
POLICY="allow"