Skip to content

Instantly share code, notes, and snippets.

View yoimbert's full-sized avatar

yoimbert yoimbert

View GitHub Profile
@yoimbert
yoimbert / PVE-host-backup.md
Created February 1, 2022 17:53 — forked from mrpeardotnet/PVE-host-backup.md
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@yoimbert
yoimbert / tcpdump
Last active March 2, 2020 13:33
TCPDUMP
https://openmaniak.com/fr/tcpdump.php
tcpdump -D See the list of interfaces on which tcpdump can listen
tcpdump -i eth0 Listen on interface eth0:
tcpdump -i any Listen on any available interface (cannot be done in promiscuous mode. Requires Linux kernel 2.2 or greater):
tcpdump -v Be verbose while capturing packets:
@yoimbert
yoimbert / Format_TV_16_9
Created June 26, 2019 13:30
FormatVideoiMovie
FORMAT TV 16/9
1920 / 1080 Pixels
FORMAT TV 4/3
1280 / 960 Pixels
pihole -up
@yoimbert
yoimbert / TurnOffPropre.lua
Created May 6, 2019 13:40
TurnOffDelayFibaro
-- Source : https://www.domotique-fibaro.fr/topic/5298-fibaro-fgd-212-micromodule-variateur-z-wave/?page=21
local delai = 2 --delai d'attente en secondes
fibaro:call(ID["LAMPE"], "turnOn")
setTimeout(function() fibaro:call(ID["LAMPE"], "turnOff") end, delai*1000)
@yoimbert
yoimbert / luaHourMotion.lua
Created February 15, 2019 07:49
Lua Hour Motion
--[[
%% autostart
%% properties
35 value
%% weather
%% events
%% globals
--]]
if fibaro:countScenes() > 1 then
@yoimbert
yoimbert / luaLights
Created April 28, 2018 21:56
luaLights
-- Code Lua Interessant :p
-- Allumage des lumières lorsque la variable Giorno_Notte passe à "Notte"
-- Déclenchement du setTimeout
-- Si >= 23:30 alors on éteint.
--[[
%% properties
%% globals
Giorno_Notte
--]]
@yoimbert
yoimbert / bashfiletest.sh
Created October 23, 2017 10:17
Bash File Test
Bash File Testing
-b filename - Block special file
-c filename - Special character file
-d directoryname - Check for directory Existence
-e filename - Check for file existence, regardless of type (node, directory, socket, etc.)
-f filename - Check for regular file existence not a directory
-G filename - Check if file exists and is owned by effective group ID
-G filename set-group-id - True if file exists and is set-group-id
-k filename - Sticky bit
@yoimbert
yoimbert / chromeyoutubeblack
Created July 4, 2017 20:20
chromeyoutubeblack
https://korben.info/activer-dark-mode-de-youtube.html
var cookieDate = new Date();
cookieDate.setFullYear(cookieDate.getFullYear( ) + 1);
document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE; expires=" + cookieDate.toGMTString( ) + "; path=/";
var cookieDate = new Date();
cookieDate.setFullYear(cookieDate.getFullYear( ) - 1);
document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE; expires=" + cookieDate.toGMTString( ) + "; path=/";
@yoimbert
yoimbert / addvghc2.lua
Created June 22, 2017 10:35
Add VG Hc2
-- Global variables
if not VG then
VG = {
['p_freebox_appToken'] = {['default']='' , ['enum']={}},
['p_freebox_lastcmd'] = {['default']='' , ['enum']={}},
['p_freebox_trackId'] = {['default']='' , ['enum']={}},
['FbxV6_IP'] = {['default']='' , ['enum']={}},
['FbxV6_HddFree'] = {['default']='0' , ['enum']={}},
['FbxV6_HddTemp'] = {['default']='0' , ['enum']={}},