Skip to content

Instantly share code, notes, and snippets.

View IIPoliII's full-sized avatar
:octocat:
I may be slow to respond.

Poli IIPoliII

:octocat:
I may be slow to respond.
View GitHub Profile
@IIPoliII
IIPoliII / egg-trackmania2020.json
Created October 7, 2022 11:15
Egg for Pterodactyl and TrackMania 2020
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY WISP - https:\/\/wisp.gg\/",
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2022-10-07T12:13:33+01:00",
"name": "Trackmania 2020",
"tag": "",
"author": "admin@polisystems.ch",
"description": "Trackmania 2020 Dedicated Server",
@IIPoliII
IIPoliII / getYearlyStat.sh
Created October 2, 2020 09:41
Get yearly used bandwidth Hetzner Robot API
#!/bin/bash
#Created by Poli
user="YourUserHere"
password="YourPasswordHere"
first_date=$(date +"%Y")"-01"
last_date=$(date +"%Y")"-12"
UsedBandwidth=0
@IIPoliII
IIPoliII / getMonthlyStats.sh
Created October 2, 2020 09:39
Get monthly used bandwidth Hetzner Robot API
#!/bin/bash
#Created by Poli
user="YourUserHere"
password="YourPasswordHere"
first_date=$(date -d "`date +%Y%m01`" +%Y-%m-%d)
last_date=$(date -d "`date +%Y%m01` +1 month -1 day" +%Y-%m-%d)
UsedBandwidth=0
@IIPoliII
IIPoliII / getDailyStats.sh
Created September 15, 2020 11:53
Get daily used bandwidth Hetzner Robot API
#!/bin/bash
#Created by Poli
user="YourUserHere"
password="YourPasswordHere"
currentDate=`date "+%Y-%m-%d"`
UsedBandwidth=0
ips=`curl -su "${user}:${password}" https://robot-ws.your-server.de/ip.json | jq '.[].ip.ip' | sed -e 's/^"//' -e 's/"$//'`
@IIPoliII
IIPoliII / install_ffmpeg_libfdkaac.sh
Created April 22, 2020 13:06 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@IIPoliII
IIPoliII / virtualhost.conf
Created February 5, 2020 11:36
Concrete5 fix for path info with apache2 on a nginx reverse proxy using https
<VirtualHost *:80>
ServerAdmin admin@john.com
DocumentRoot /var/www/john.com
ErrorLog /error.log
CustomLog /access.log combined
ServerName john.com
ServerAlias www.john.com
DirectoryIndex index.php
AcceptPathInfo On
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
@IIPoliII
IIPoliII / GSCompress.sh
Last active December 15, 2022 12:54
GhostScript PDF compression of a folder and all the subfolders with multithreading (using screen)
#!/bin/bash
#Variable for choosing the file
FileInput=$1
FileOutput=$2
#GS compression of the pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r300 -sOutputFile="$FileOutput" "$FileInput"
mv "$FileOutput" "$FileInput"