Skip to content

Instantly share code, notes, and snippets.

View 3isenHeiM's full-sized avatar
🏠
Working from home

3isenHeiM 3isenHeiM

🏠
Working from home
View GitHub Profile
@3isenHeiM
3isenHeiM / actions_track-wan-ip.conf
Last active February 8, 2024 10:29 — forked from PiDroid-B/actions_blacklist-update.conf
OPNsense track the WAN IP changes via custom cron
[update-ip]
command:/usr/local/custom-scripts/track-public-ip.sh
parameters:
type:script
description:Track WAN IP address and update a file in the root folder
message:WAN IP tracked
@3isenHeiM
3isenHeiM / track_public_IP.sh
Last active February 8, 2024 10:03
Track Public IP for OPNsense
#!/bin/sh
TRACKING_FILE="/tmp/public_ip.log"
# Get Public IP adress
get_public_ip() {
# dig @resolver4.opendns.com myip.opendns.com +short -4
# OPNsense does not have dig
drill @resolver4.opendns.com myip.opendns.com | grep "myip.opendns" | grep -v ";" | awk '{print $5}'
}
@3isenHeiM
3isenHeiM / arch_install.sh
Last active October 24, 2023 11:44
Arch installation
pacman -Syu
pacman -S xorg xorg-server mate mate-extra lightdm lightdm-gtk-greeter
systemctl enable lightdm
systemctl enable sshd
systemctl start sshd
pacman -S mate-tweak sudo vim htop arc-gtk-theme python-pip
useradd -m pierre
usermod -aG video pierre
usermod -aG sudo pierre
usermod -aG wheel pierre
@3isenHeiM
3isenHeiM / install.md
Last active November 22, 2022 10:22 — forked from AndersonIncorp/install.md
Install any linux distro on VPS with low RAM, locked ISO boot

Overview

Scenario

  • Your VPS provider doesn't support ISO mount
  • Your VPS has low RAM and cannot load whole ISO image
  • Your current /boot is to small to contain ISO file

Workaround

  • Boot low memory ISO (CorePure64.iso ~ 14MB)
  • Create new partition ~1GB / size of your ISO
  • dd your ISO into that partition
@3isenHeiM
3isenHeiM / Trouver date de Simpléourd
Created May 1, 2022 20:59
Ce script python permet de lister les 10 prochaines dates de Simpélourd
#!/bin/env python3
import calendar
import locale
from datetime import datetime, timedelta
locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8') ## first I set locale
c = calendar.Calendar(firstweekday=calendar.MONDAY)
# Get the 10 coming years
@3isenHeiM
3isenHeiM / SMBver.sh
Created April 20, 2021 12:49
Get the SMB version from a tcpdump capture
#!/bin/sh
# Author: rewardone / 3isenHeiM
# Description:
# Requires root or enough permissions to use tcpdump
# Will listen for the first 8 packets of a null login
# and grab the SMB Version
# Notes:
# Will sometimes not capture or will print multiple
# lines. May need to run a second time for success.
@3isenHeiM
3isenHeiM / crawl_sailbotlistings_pics.sh
Created March 1, 2021 12:53
This script will download the HIGH-RES pictures of listings from SailBoatlistings.com
#!/bin/bash
rm *.html > /dev/null 2>&1
# Enter the yachtworld page :
read -p "Paste the SailBoat Listings page: " WEBPAGE
# Extract the image links and wget them
wget -O web_page.html $WEBPAGE
@3isenHeiM
3isenHeiM / Nmap_top_port_list.sh
Created December 9, 2020 13:29
Build Nmap top port list
#/bin/bash
# This snippet will output a comma-separated list of the top XXX most used ports (according to Nmap),
# given XXX a number (eg 20, 1000) passed as argument.
# Usage (to output the top 10 most common ports) :
# root@localhost # ./Nmap_top_port_list.sh 10
# 21-23,25,80,110,139,443,445,3389
top=$1
@3isenHeiM
3isenHeiM / Install_FireflyIII_TrueNAS.md
Last active November 20, 2020 13:47
Install FireflyIII in a TrueNAS jail
@3isenHeiM
3isenHeiM / Install_FireflyIII_OVH.md
Last active December 9, 2020 10:03
Install Firefly III on OVH web hosting PRO

How to Install Firefly III on OVH web hosting (PRO only)

Requirements

  • OVH web hosting pro (for php CLI access via SSH)
  • MySQL database

Steps

1. Upgrade the PHP version

As of now (november 2020), OVH only proposes PHP 7.3. However, FireFly requires PHP 7.4.