Skip to content

Instantly share code, notes, and snippets.

Avatar

Emory L. emory

View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created Feb 5, 2022
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
View killbutmakeitlooklikeanaccident.sh
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@tallguyjenks
tallguyjenks / code.sh
Last active Jul 23, 2022
ZettelKasten Sync Code
View code.sh
# To permanently cache the credentials
git config --global credential.helper store
# To ignore files that could cause issues across different workspaces
touch .gitignore
echo ".obsidian/cache
.trash/
.DS_Store" > .gitignore
@tallguyjenks
tallguyjenks / obsidian.md
Last active Nov 1, 2021
My custom theme for the Obsidian Editor
View obsidian.md

To get a copy of my most up to date custom CSS sign up to my monthly newsletter [[HERE]] Thank you! 🙏🏻️

@gcaprio
gcaprio / convert_markdown_files_to_drafts.py
Last active May 21, 2022
Convert a directory of Markdown (.md) files into a JSON format for importing into the Drafts Mac app
View convert_markdown_files_to_drafts.py
# Usage:
# python3 convert_markdown_files_to_drafts.py <directory> > DraftsExport.draftsExport
import os, time
import json
import uuid
import sys
from datetime import datetime, timezone
output_datetime_format = '%Y-%m-%dT%H:%M:%S%Z'
View AdGuardHome.yaml
bind_host: 0.0.0.0
bind_port: 80
users:
- name:
password:
language: ""
rlimit_nofile: 0
web_session_ttl: 720
dns:
bind_host: 0.0.0.0
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active Aug 9, 2022
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support (Installation instructions in 1st comment)
View ffmpeg-wrapper
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@CHTJonas
CHTJonas / UniFi Tunnelbroker.md
Last active Apr 26, 2022
Tunnelbroker config for UniFi Security Gateway
View UniFi Tunnelbroker.md

UniFi Tunnelbroker Configuration

This GitHub Gist details the manual configuration needed on a UniFi controller to enable IPv6 tunneling with Hurricane Electric's Tunnelbroker service.

Setup

This is what works for me personally. Stuff you'll need to do to adapt this to your ends:

  • Replace "local-ip" with your USG's public IPv4 address.
  • Replace "remote-ip" with the address of your Tunnelbroker tunnel server.
  • Replace "address" with the IPv6 address that your are allocated.
@caseywatts
caseywatts / 0-self-publishing.md
Last active Aug 7, 2022
Self-Publishing via Markdown
View 0-self-publishing.md
@Neo23x0
Neo23x0 / Base64_CheatSheet.md
Last active Aug 4, 2022
Learning Aid - Top Base64 Encodings Table
View Base64_CheatSheet.md

Learning Aid - Top Base64 Encodings Table

Base64 Code Mnemonic Aid Decoded* Description
JAB 🗣 Jabber $. Variable declaration (UTF-16)
TVq 📺 Television MZ MZ header
SUVY 🚙 SUV IEX PowerShell Invoke Expression
SQBFAF 🐣 Squab favorite I.E. PowerShell Invoke Expression (UTF-16)
SQBuAH 🐣 Squab uahhh I.n. PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz
PAA 💪 "Pah!" &lt;. Often used by Emotet (UTF-16)
@xirixiz
xirixiz / pihole-macvlan-synology-docker.txt
Last active Jul 26, 2022
Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example)
View pihole-macvlan-synology-docker.txt
#!/bin/bash
# NAS IP: 192.168.1.10 in this example
# DHCP scope reservation for macvlan: 192.168.1.210/28 (Details below)
## Network: 192.168.1.210/28
## HostMin: 192.168.1.211
## HostMax: 192.168.1.224
## Hosts/Net: 14
# Create a Synology macvlan0 bridge network attached to the physical eth0, and add the ip range scope (sudo)