Skip to content

Instantly share code, notes, and snippets.

View JBlond's full-sized avatar

Mario JBlond

  • Germany
  • 14:00 (UTC +02:00)
View GitHub Profile
@JBlond
JBlond / observe.sh
Created July 7, 2023 10:58
Update Observium CE
#!/bin/bash
cd /opt
mv observium observium_old
wget -Oobservium-community-latest.tar.gz https://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
mv /opt/observium_old/rrd observium/
mv /opt/observium_old/logs observium/
mv /opt/observium_old/config.php observium/
/opt/observium/discovery.php -u
@JBlond
JBlond / install.bash
Created July 5, 2023 06:49
Truenas truecommand docker install
docker pull ixsystems/truecommand
docker run --detach -v "[hostdirectory]:/data" -p [portnumber]:80 -p [sslportnumber]:443 ixsystems/truecommand
@JBlond
JBlond / episoden.md
Last active April 2, 2024 10:32
Fragezeichen Episoden

Drei Fragezeichen Episoden

Nr. Titel Erscheinung Autor Rating
001 und der Super-Papagei 1979-10-12 Robert Arthur
002 und der Phantomsee 1979-10-13 William Arden
003 und der Karpatenhund 1979-10-14 M. V. Carey
004 und die schwarze Katze 1979-10-15 William Arden
005 und der Fluch des Rubins 1979-10-16 Robert Arthur
006 und der sprechende Totenkopf 1979-10-17 Robert Arthur
@JBlond
JBlond / observium-update.sh
Created January 5, 2023 10:41
observium-update
cd /opt
mv observium observium_old
wget -Oobservium-community-latest.tar.gz https://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
mv /opt/observium_old/rrd observium/
mv /opt/observium_old/logs observium/
cp /opt/observium_old/config.php observium/
/opt/observium/discovery.php -u
@JBlond
JBlond / enable-hibernate.cmd
Created August 1, 2022 06:12
enable-hibernate.cmd
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
@JBlond
JBlond / update-portainer.sh
Last active April 10, 2023 12:31
update portainer
#!/bin/bash
docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:2.14.0
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:2.14.0
@JBlond
JBlond / cloudflare.php
Created July 5, 2022 08:02
change IP if it is coming from cloudflare
<?php
//Cloudflare IP Reset
//See if ip fits in IP range
function ip_in_network($ip, $net_addr, $net_mask){
if($net_mask <= 0){ return false; }
$ip_binary_string = sprintf("%032b",ip2long($ip));
$net_binary_string = sprintf("%032b",ip2long($net_addr));
return (substr_compare($ip_binary_string,$net_binary_string,0,$net_mask) === 0);
}
//See if the "Cloudflare IP" is really a cloudflare IP
@JBlond
JBlond / smc_read smc_read.c
Created May 17, 2022 08:42
Mac OS X 10.5 smc_read smc_read
/*
* smc_read.c: Written for Mac OS X 10.5. Compile as follows:
*
* gcc -Wall -o smc_read smc_read.c -framework IOKit
*/
#include <stdio.h>
#include <IOKit/IOKitLib.h>
@JBlond
JBlond / LdapAuth.php
Last active April 10, 2023 12:32
LdapAuth php
<?php
/**
* LDAP Auth Handler
*/
class LdapAuth
{
/**
* @var false|resource
*/
private $handle;
@JBlond
JBlond / 99fixbadproxy
Created October 11, 2021 08:01 — forked from trastle/99fixbadproxy
Fixing the issue with apt caused by a bad local proxy: -1- Create 99fixbadproxy at: /etc/apt/apt.conf.d/99fixbadproxy -2- Run clear.sh
Acquire::http::Pipeline-Depth "0";
Acquire::http::No-Cache=True;
Acquire::BrokenProxy=true;