Skip to content

Instantly share code, notes, and snippets.

@vincent1890
vincent1890 / extra.js
Created November 10, 2018 17:41 — forked from german-bortoli/extra.js
Grafana auto login
$( document ).ready(function() {
/**
* Cookies management library
*
* @type type
*/
var helperCookie = {
findAll: function () {
var cookies = {};
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
set firewall source-validation disable
set interfaces ethernet eth0 vif 838 address dhcp
set interfaces ethernet eth0 vif 838 dhcp-options client-option "send vendor-class-identifier "sagem";"
set interfaces ethernet eth0 vif 838 dhcp-options client-option "send user-class "\047FSVDSL_livebox.MLTV.softathome.Livebox4";"
@vincent1890
vincent1890 / vm-rename
Created June 16, 2019 21:30 — forked from raarts/vm-rename
Script to rename a virtual machine in ESXi 6
#!/bin/sh
#
# shell script to rename a virtual machine in ESXi
#set -x
if [ $# -ne 4 ]; then
echo "Usage: $0 VOLNAME DIRNAME OLDNAME NEWNAME
where VOLNAME is the volume name, e.g. datastore1,
DIRNAME is the the name of the directory of the virtual machine,
@vincent1890
vincent1890 / installer.sh
Created August 30, 2020 05:03 — forked from daminebenq/installer.sh
Teamspeak Server install script
#!/bin/bash
# Name: install_ts3-server.sh
# Version: 0.0
# Created By: BJARNE L.
# ==> VARIABLES <==
# user to run the ts3server and where to install it
TS3_USER="teamspeak3"
TS3_DIR="/opt/ts3server"
TS3_VER="3.10.0"
#!/bin/sh
# "include: /etc/unbound/ad-blacklist.conf" in /var/unbound/etc/unbound.conf
# run this script as a daily cron
#
# The list URLs were taken from the pi-hole project.
# More experimental lists are at https://github.com/pi-hole/pi-hole/blob/master/adlists.default
TMPFILE=$( mktemp get_dns_blacklists-XXXXXXXXX )
trap 'rm -f $TMPFILE; exit 1' EXIT KILL INT QUIT TERM
@vincent1890
vincent1890 / cas_logout.php
Created July 6, 2021 21:41 — forked from wixaw/cas_logout.php
Cleaning remove delete SSO CAS session apereo/mod_auth_cas PHP
<?php
// Cleaning CAS session apereo/mod_auth_cas (https://github.com/apereo/mod_auth_cas)
// Sarting session
session_start();
if ((!isset($_SERVER["PHP_AUTH_USER"])) || (!empty($_SERVER["PHP_AUTH_USER"]))) {
// Get username
$login = $_SERVER["PHP_AUTH_USER"];
// Select your Folder ( set by CASCookiePath /var/cache/apache2/mod_auth_cas/ )
@vincent1890
vincent1890 / keepalived.conf
Created July 11, 2021 20:40 — forked from gasgasalterego/keepalived.conf
KeepAlived configuration for automatic switch of virtual IP between two MySQL instances configured in Master/Slave and with circular replica.
##############################################################################################################################################
# This configuration needs 2 fails in order to change from current state to FAULT state and needs 2 success to change from BACKUP state to
# MASTER state.
#
# !!!MOST IMPORTANT!!!
# BEFORE keepalived can be started this file must be poperly edited (see HOW TO section below)
#
# HOW TO
# 1 - Check all the parameters of the script(s) in the "vrrp_script check_mysql" section below are correct
# 2 - unicast_src_ip (IP of the local machine) must be manually edited
@vincent1890
vincent1890 / ts3afkmover.php
Created August 13, 2021 03:23 — forked from Captnwalker1/ts3afkmover.php
TS3 AFK Mover
<?php
/*
*TS3 AFK Mover (CLI+DB) by The-Killer
* 2014-06-12 initial release
* 2018-05-13 add channel statistics collecting
*/
//Include php ts3 library http://addons.teamspeak.com/directory/addon/integration/TeamSpeak-3-PHP-Framework.html
require_once('lib/libraries/TeamSpeak3/TeamSpeak3.php');
//Mysqli connection just stored in another file
require_once('mysql.inc.php');
@vincent1890
vincent1890 / gotify.sh
Created August 21, 2021 16:13 — forked from mskian/gotify.sh
Gotify - A Simple Shell Script to Send Push Notification to the Gotify Server
#!/bin/bash
# -----------------------------------------------------------------------------
# Info:
# author: Santhosh veer
# website: https://santhoshveer.com
# file: gotify.sh
# created: 22.01.2020
# revision: 22.02.2020
# version: 0.1
@vincent1890
vincent1890 / boot.config
Created September 9, 2022 10:40 — forked from kgersen/boot.config
orange ERL 3 - remplacement complet de la Livebox routeur
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "Packets from Internet to LAN"