Skip to content

Instantly share code, notes, and snippets.

@Captnwalker1
Captnwalker1 / ts3afkmover.php
Last active September 27, 2021 20:02
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');
@irazasyed
irazasyed / manage-etc-hosts.sh
Created March 7, 2015 09:16
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1
@CoffeePirate
CoffeePirate / se_server_linux.md
Last active June 29, 2024 15:49
A quick guide how to setup Space Engineers Dedicated server on a Linux box with Wine

Ubuntu 14.04/14.10 SpaceEngineers Dedicated Server

Here's a quick guide how to run SpaceEngineers Dedicated Server on Ubuntu with Wine

Requirements

  • A copy of Space Engineers
  • A Windows box
  • A Linux box running Ubuntu 14.04 or 14.10 (It'll probably work on other distros, YMMV)

Step #1: Install & configure Wine1.6 and dependencies

@ctigeek
ctigeek / PowershellAes.ps1
Last active July 11, 2024 06:43
Aes Encryption using powershell.
function Create-AesManagedObject($key, $IV) {
$aesManaged = New-Object "System.Security.Cryptography.AesManaged"
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC
$aesManaged.Padding = [System.Security.Cryptography.PaddingMode]::Zeros
$aesManaged.BlockSize = 128
$aesManaged.KeySize = 256
if ($IV) {
if ($IV.getType().Name -eq "String") {
$aesManaged.IV = [System.Convert]::FromBase64String($IV)
}
@kgersen
kgersen / boot.config
Last active March 15, 2023 22:34
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"
extraits des parties spécifiques a DHCP:
interfaces {
ethernet eth1 {
description ONT
duplex auto
speed auto
vif 832 {
address dhcp
description "Internet Orange DHCP"
@svyatov
svyatov / le-renew-webroot
Last active October 4, 2020 03:23 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file='/usr/local/etc/le-renew-webroot.ini'
le_path='/opt/letsencrypt'
exp_limit=15;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@raarts
raarts / vm-rename
Last active April 18, 2022 18:18
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,
@gasgasalterego
gasgasalterego / keepalived.conf
Created July 26, 2016 13:56
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
@MarkTiedemann
MarkTiedemann / download.cmd
Created March 2, 2017 23:11
Download file and print content via batch script
@ECHO off
SET downloadUrl=https://api.github.com/users/marktiedemann
SET tempFile=%cd%\.%random%-tmp
BITSADMIN /transfer /download %downloadUrl% %tempFile% >nul
TYPE %tempFile%
DEL %tempFile%