Skip to content

Instantly share code, notes, and snippets.

View wicadmin's full-sized avatar
🌴
Relaxing in Paradise

Capt. Jack wicadmin

🌴
Relaxing in Paradise
View GitHub Profile
@wicadmin
wicadmin / lftpprogress
Last active May 3, 2021 18:03
LFTP Progress
This is a script I use which runs on a scheduler (e.g. cron) every 5 min and sends the progress of a LFTP transfer to MQTT.
In my case I then have NodeRed read it and send it to Telegram. Also, I run LFTP in a docker container,
so adjust if you do not. Those parts are not covered here.
I also use three threads, so adjust that accordingly also.
#!/bin/bash
exec 100>/var/tmp/lftpprogresslock.lock || exit 1
flock -n 100 || exit 1 # Exit if process is already running
@wicadmin
wicadmin / README.md
Created March 28, 2020 15:59 — forked from tsertkov/README.md
Single-node kubernetes cluster cloud-config

Single-node kubernetes cluster cloud-config

Cloud-config files for setting up k8s single-node cluster with kubeadm on Ubuntu 16.04.3 LTS (Xenial Xerus)

cloud-config.minimal.yaml

Minimal installation of k8s with kubeadm.

cloud-config.full.yaml

@wicadmin
wicadmin / AdditionaInfo.txt
Last active December 25, 2018 19:31
OpenWRT Gobinet Sierra 7455 Modem
https://forum.sierrawireless.com/t/compiling-gobi-drivers-under-rhel-6-9-x86-64/12414
https://blog.csdn.net/qq_22340085/article/details/51828854
@wicadmin
wicadmin / mirror_remote_directory_to_local_directory
Created January 11, 2018 15:49 — forked from pixeline/mirror_remote_directory_to_local_directory
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY
@wicadmin
wicadmin / Tmux.md
Created January 6, 2018 00:11 — forked from zxy1256/Tmux.md
Tmux

tmux shortcuts & cheatsheet

Sessions

start new:

tmux
@wicadmin
wicadmin / tmux-cheats.md
Created January 5, 2018 23:06 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session