Skip to content

Instantly share code, notes, and snippets.

View Erisa's full-sized avatar
💕

Erisa A Erisa

💕
View GitHub Profile
@TheFarmingBunny
TheFarmingBunny / rules.v4
Created February 17, 2020 18:48
iptables
# Generated by xtables-save v1.8.2 on Thu Jan 23 19:30:09 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A OUTPUT -j LOG -p tcp -o eth1 --dport 32400 --log-prefix "DROP:" --log-level 6
-A OUTPUT -j LOG -p tcp -o eth1 --dport 8112 --log-prefix "DROP:" --log-level 6
-A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -j ACCEPT
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
# Copyright (C) 2012 The CyanogenMod Project
# (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@nekoprog
nekoprog / OPNsense aarch64.txt
Last active January 3, 2022 14:24
OPNsense aarch64 Todo List
https://www.worksonarm.com/explore/freebsd/
https://wiki.freebsd.org/arm64
https://wiki.freebsd.org/arm64?action=AttachFile&do=view&target=arm64_build.sh
https://ci.freebsd.org/job/FreeBSD-stable-11-aarch64-build/
https://github.com/HardenedBSD/hardenedbsd-ports/blob/master/sysutils/Makefile
https://www.aliexpress.com/item/32880728063.html
http://www.banana-pi.org/r64.html
http://espressobin.net/
http://wiki.espressobin.net/tiki-index.php
@mpost
mpost / android-cli.bat
Created July 29, 2016 14:47
Register windows context menu entry to adb install apk from explorer
@ECHO OFF
ECHO Running "adb install -r %1"
adb install -r %1
PAUSE
@KianNH
KianNH / cloudflare-remove-all-records.ps1
Created May 13, 2022 15:55
Cloudflare - Remove all DNS records in a given zone
$API_TOKEN = "<api-token>"
$ZONE_ID = "<zone-id>"
$baseUrl = "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records"
$headers = @{
'Authorization' = "Bearer $API_TOKEN"
'Content-Type' = "application/json"
}
@srustagi
srustagi / fix_fhb.py
Last active November 27, 2022 20:30
Remove UTC timestamp from Windows File History Backup for all files in folder recursively, skip over duplicates.
import re
from os.path import join
from os import walk, rename
FOLDER_PATH = join('PATH_TO', 'DIR_NAME')
for path, subdirs, files in walk(FOLDER_PATH):
for i, name in enumerate(files):
fixed = re.sub(r' \(.+\)', '', name)
print('{} / {}'.format(i + 1, len(files)))
@jacobmischka
jacobmischka / ds4led
Created December 30, 2015 04:20
Changes color for ds4 controller lightbar on linux and gives permissions so games can change it too if they support it.
#!/bin/bash
# This isn't really that safe to blindly run,
# as it uses sudo to change system file permissions.
# Hopefully it shouldn't break anything though.
# Usage: ds4led [r value] [g value] [b value]
# or `ds4led orange` to set it to orange.
DS4="0003:054C:05C4.*"
cd /sys/class/leds
@yetanotherchris
yetanotherchris / hastebin-client-csharp.cs
Last active April 18, 2023 06:27
A Hastebin client in C#
void Main()
{
// To run Hastebin in Docker:
// docker run --name pastebin -p 801:80 mkodockx/docker-pastebin
string baseUrl = "http://localhost:801/";
var hasteBinClient = new HasteBinClient(baseUrl);
HasteBinResult result = hasteBinClient.Post("Hello hastebin").Result;
if (result.IsSuccess)
@tadly
tadly / pacaur_install.sh
Last active August 30, 2023 13:15
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time