Skip to content

Instantly share code, notes, and snippets.

View nogweii's full-sized avatar
🍀

Nogweii nogweii

🍀
View GitHub Profile
@HeedfulCrayon
HeedfulCrayon / README.md
Last active March 26, 2024 06:42
Script for OBS Studio to publish session stats to MQTT broker with autodiscovery set up for Home Assistant

OBS MQTT Status to Home Assistant

Setup:

  1. Download script
  2. Install mqtt-wrapper pip install mqtt-wrapper
  3. Open OBS Studio
  4. In OBS Studio add a script (Tools -> Scripts)
  5. Configure script parameters (my base channel is homeassistant and my sensor name is obs, creating the path homeassistant/sensor/obs)

script_parameters

@vorstrelok
vorstrelok / keepassxc_pam.fish
Created February 2, 2021 15:20
KeePassXC PAM loing manager integration
#!/usr/bin/fish --private
# !!!Security note!!!
# This will give any process running as your user access to your password while
# key has not expired (2 minutes or revocation by service, whatever comes first)
# Proper solution would probably be writing PAM module and transfering key
# straight to KeePassXC's own keyring
set userid (/usr/bin/id -u "$PAM_USER")
if test "$PAM_TYPE" = 'auth'
@tekin
tekin / .gitattributes
Last active February 23, 2024 16:46
An example .gitattributes file that will configure custom hunk header patterns for some common languages and file formats. See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details.
# Stick this in your home directory and point your Global Git config at it by running:
#
# $ git config --global core.attributesfile ~/.gitattributes
#
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
@BrennanMcDonald
BrennanMcDonald / .Master-To-Main.md
Last active May 10, 2022 11:29
Updates the default branch of a users repos to something less impactful.

Master To Main

A simple script to convert the default name of a user's branches from 'master' to 'main' (or another name specified)

Installing

Place both the main.py and requirements.txt in a directory and run pip install -r requirements.txt.

Usage

main.py -t -r -n

@triffid
triffid / openrc-init-pia
Last active February 15, 2024 06:48
shell script for accessing PIA wireguard
#!/sbin/openrc-run
command="/root/bin/pia-wg.sh"
CONFIGDIR="${CONFIGDIR:-/var/cache/pia-wg}"
CONFIG="${CONFIG:-/etc/pia-wg/pia-wg.conf}"
extra_started_commands="reload"
depend() {
@fabiolimace
fabiolimace / UUIDv6.sql
Last active April 30, 2024 06:04
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@darkquasar
darkquasar / splunk_suspicious_user_agent.md
Last active May 10, 2022 08:06
Splunk Search to Weed Out Low Hanging Fruit and Out-Of-The-Box Pentest

Draft rule for a Splunk Search

Suspicious User Agents

You will not detect APTs with this but you will weed out low hanging fruit and not too savvy pentesters :)

user_agent IN ("burp" "burpcollaborator.net" "qualys" "nexpose" "OpenVAS" "Nikto" "Meterpreter" "IceWeasel" "DirB" "Comodo" "Tripwire" "Retina" "MBSA" "ImmuniWeb" "Netsparker" "Acunetix" "Intruder" "WinHttp.WinHttpRequest" "nmap" "CVE" "base64" "eval" "ftp" "/script" "javascript" "alert" ) NOT (user_agent="google") | eval detection_description=if(like(user_agent,"%WinHttpRequest%"),"CScript or VBScript Call",detection_description) | eval detection_description=if(like(user_agent,"%Iceweasel%"),"Potentially Kali",detection_description) | eval detection_description=if(like(user_agent,"%Meterpreter%"),"Meterpreter",detection_description)

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 6, 2024 10:50
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@nogweii
nogweii / status_play.gql
Created September 18, 2019 06:16
Github GraphQL query to change your Github status
query GetCurrentStaus {
viewer {
login
status {
emoji
message
}
}
}