Skip to content

Instantly share code, notes, and snippets.

View Tawmu's full-sized avatar
🤡
clownery in progress

Tawmu Tawmu

🤡
clownery in progress
  • United Kingdom
  • 11:49 (UTC +01:00)
View GitHub Profile
$natrules = "\n# NAT Redirects\n";
$natrules .= "no nat proto carp all\n";
$natrules .= "no rdr proto carp all\n";
$natrules .= "binat-anchor \"miniupnpd\"\n";
$natrules .= "nat-anchor \"miniupnpd\"\n";
$natrules .= $fw->outputNatRules();
$rules .= "{$natrules}\n";
@visualphoenix
visualphoenix / docker-machine-setup.sh
Created September 1, 2021 15:04
docker-machine setup for mac with nfs and vmware
#!/bin/bash
#
# the following functions can be used to provision, or reprovision docker-machine as a replacement for docker-for-mac
# it has only been tested with vmware on osx catalina
#
# it assumes the following has already been run:
# brew install docker-machine docker
#
get-interface-ip-from-ip-route() {
@Ghostbird
Ghostbird / docker-compose.yml
Last active May 27, 2021 21:57
Docker compose file for graylog 4. Demonstrates the bug at https://github.com/Graylog2/graylog2-server/issues/9550
version: '3'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongo:
image: mongo:4.4
volumes:
- mongo_data:/data/db
networks:
- graylog
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active February 19, 2025 20:54
optimising-unifi-performance

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.
@craigarms
craigarms / cisco_ios_upgrade.yml
Last active February 3, 2025 21:35
Ansible Playbook for loading IOS to cisco Device Flash and copying to other stack members
---
- hosts: enterprise_l2
gather_facts: false
connection: local
vars:
models:
"WS-C2960XR-48FPD-I":
ios_version: "15.2(7)E0a"
ios_path: "IOS/"
@matthiassb
matthiassb / dns-sync.sh
Last active August 24, 2024 09:43
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
Open up browser console, for Chrome, hit F12 and copy-paste and enter this
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);
Repeat until all items are unsaved.
@axemann
axemann / librenms_linux_mon_setup.txt
Last active February 15, 2025 20:18
LibreNMS Linux server monitoring setup (Ubuntu)
sudo apt-get install snmpd -y
sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
sudo su -
sudo cat > /etc/snmp/snmpd.conf << EOF
# Change public below to your preferred SNMP community string
com2sec readonly default public
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
@matthiassb
matthiassb / auth-duo.py
Created July 31, 2016 03:31
PAM LDAP Authentication with two-factor authentication with DUO in python
import duo_client
import ldap
auth_api = duo_client.Auth(
ikey='<ikey>',
skey='<skey>',
host='<host>',
)
LDAP_SERVER = 'ldap://10.1.0.143'
@wpg4665
wpg4665 / reclaimWindows10.ps1
Last active November 11, 2018 02:26 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Forked from http://pastebin.com/gQxCUkLP
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Original Version: 1.4, 2016-01-16
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE
##########
# Ask for elevated permissions if required
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {