Skip to content

Instantly share code, notes, and snippets.

View Handsome1080P's full-sized avatar
🌴
On vacation

JohnConnor Handsome1080P

🌴
On vacation
  • CMD
  • TaiPei
View GitHub Profile
@rrrrrrri
rrrrrrri / fgt_7.4.x_rootfs_decrypt.py
Created March 15, 2024 01:26
fgt_7.4.x_rootfs_decrypt
import magic
import r2pipe
import hashlib
import argparse
import subprocess
from unicorn import *
from unicorn.x86_const import *
# from udbserver import * # uncomment this line if you want to debug
def pad_size(size):
@aman207
aman207 / certificate-update.py
Created August 21, 2023 13:32
Fortigate wildcard certificate update
from fortigate_api import Fortigate
import base64
from datetime import datetime
import inotify.adapters
import inotify.constants
import requests
#Wildcard cert file location
CERT_FILE = ""
#Key file location
@Handsome1080P
Handsome1080P / vpnserver.service
Created August 13, 2023 02:58 — forked from hkato/vpnserver.service
Systemd Unit configuration for SoftEther VPN Server
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
ExecStartPost=/bin/sleep 5
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment dev=$(ip addr | grep tap_ | sed 's/^.*: \(tap_.*\):.*$/\1/g')"
@linxichen
linxichen / dell_loud_fan.txt
Created February 7, 2022 23:35
Solution to Dell PowerEdge server loud fan
Reddit post: https://www.reddit.com/r/homelab/comments/j3hh1r/poweredge_r730xd_fans_loud_wont_slow_down_help/
iDRAC Setting Fan Speed on Poweredge R730xd with IPMI (should work with others but cmds will vary with device names
=========================================================================================================
Reference: https://gist.github.com/mdpuma/8972079b7da52afef15cc039039ff818
1. Get your iDRAC on the LAN and config a username and password
2. In the iDRAC interface (access via web browser), enable IPMI in iDRAC Settings > Network > IPMI Settings
3. Download/install the Dell iDRAC tools for windows (in this case, filename was DellEMC-iDRACTools-Web-WINPE-9.4.0-3732_A00.exe)
4. Open a cmd prompt (iDRAC IP in this example is 192.168.16.2)
5. cd c:\program files\dell\sysmgt\iDRACTools\IPMI
@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active May 15, 2024 06:19
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

@Blad3Mak3r
Blad3Mak3r / tunnelbroker.md
Last active November 11, 2022 00:23
HE ipv6 Tunnelbroker configuration for Debian 11

TunnelBroker-Debian11

Configure /etc/network/interfaces

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
        address   2001:470:xxxx::2
        netmask   48
        endpoint  xxx.xxx.xxx.xxx
 local xxx.xxx.xxx.xxx
@KavenTheriault
KavenTheriault / mkinitcpio_nvidia.md
Created August 7, 2020 21:02
Nvidia driver and mkinitcpio

Nvidia driver and mkinitcpio

First, install nvidia drivers

sudo pacman -S nvidia

Edit the following line of /etc/mkinitcpio.conf

MODULES=(i915? nouveau? vboxvideo? vmwgfx?)
@k9982874
k9982874 / archlinux-server-optimization.sh
Last active August 15, 2023 19:05
archlinux-server-optimization.sh
#!/bin/sh
# Archlinux Server Optimization
cat > /etc/systemd/user.conf <<EOF
DefaultLimitNOFILE = 1048576
EOF
cat > /etc/systemd/system.conf <<EOF
DefaultLimitNOFILE = 2097152
EOF
@irgendwr
irgendwr / phpmyadmin.conf
Created March 25, 2019 16:00
Nginx snippet for serving phpmyadmin in a custom subdirectory
location /pma {
alias /usr/share/phpmyadmin;
try_files $uri $uri/ @pma =404;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # <-- change this to fit your installation
}
}
@cftang0827
cftang0827 / pppoe.service
Created November 23, 2018 19:24
systemd for pppoe pon network connection
[Unit]
Description=pppoe
[Service]
Type=simple
WorkingDirectory=/usr/bin/
ExecStart=/usr/bin/pon dsl-provider
Restart=always
[Install]