Skip to content

Instantly share code, notes, and snippets.

@misostack
misostack / 100-days-mysql.md
Last active January 16, 2024 20:59
100 days mysql

100 days MYSQL

MYSQL High Performance Day 1

Overview Architecture

image

Built-in functions (e.g., dates, times, math, and encryption). Any functionality provided across storage engines lives at this level: stored procedures, triggers, and views

@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active October 14, 2025 08:35
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
#/bin/bash
## taking.kr (webmaster@taking.kr)
## 2019-06-11
###########################################
read -p "hostname (ex taking.kr): " uhost
read -p "new username: " uname
read -p "$uname's Password: " upasswd
encrypt_pass=$(perl -e 'print crypt($ARGV[0], "password")' $upasswd)
############ nameserver setting ###############
@ironicbadger
ironicbadger / gist:d0e633f1bb5a0fa24166bcff951aaec7
Created January 1, 2018 18:53
influx-gpu-nvidia-scrape.sh
#!/bin/bash
# wrote by Ox HaK
# https://pbs.twimg.com/media/DPplpHnW4AIFg8j.jpg:large
# ccminer need parameter --api-bind=127.0.0.1:4068 --api-allow=0/0
# https://wiki.archlinux.org/index.php/Grafana
# https://wiki.archlinux.org/index.php/InfluxDB
# https://docs.influxdata.com/influxdb/v1.3/guides/writing_data/
let x=0
#while [ "true" ]
@blacktwin
blacktwin / find_plex_meta.py
Last active July 19, 2023 15:53
Find location of Plex metadata.
'''
Find location of Plex metadata.
find_plex_meta.py -s adventure
pulls all titles with adventure in the title
or
find_plex_meta.py -s adventure -m movie
pulls all movie titles with adventure in the title
'''
@BretFisher
BretFisher / docker-for-mac.md
Last active June 23, 2025 11:39
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@shadone
shadone / speedtest_tester.sh
Created February 6, 2016 23:03
Send speedtest.net results to influxdb
#!/bin/bash
INFLUXDB_HOST="localhost"
INFLUXDB_PORT="8086"
DATABASE="home"
[ -f /etc/default/speedtest_tester ] && . /etc/default/speedtest_tester
while [[ $# > 0 ]]; do
key="$1"
@Samgarr
Samgarr / blcheck.sh
Last active December 8, 2022 20:03 — forked from jvehent/gist:1629798
Blacklist monitoring script for Zabbix.
#!/usr/bin/env bash
DEBUG="$2"
IP="$1"
blstatus=0
# RBL list from http://www.anti-abuse.org/multi-rbl-check/, slightly customized
RBL="bl.spamcop.net cbl.abuseat.org b.barracudacentral.org dnsbl.sorbs.net http.dnsbl.sorbs.net dul.dnsbl.sorbs.net misc.dnsbl.sorbs.net smtp.dnsbl.sorbs.net socks.dnsbl.sorbs.net spam.dnsbl.sorbs.net web.dnsbl.sorbs.net zombie.dnsbl.sorbs.net dnsbl-1.uceprotect.net dnsbl-2.uceprotect.net dnsbl-3.uceprotect.net bl.spamcannibal.org psbl.surriel.com ubl.unsubscore.com rbl.spamlab.com dyna.spamrats.com noptr.spamrats.com spam.spamrats.com cbl.anti-spam.org.cn cdl.anti-spam.org.cn dnsbl.inps.de drone.abuse.ch httpbl.abuse.ch dul.ru spamrbl.imp.ch wormrbl.imp.ch virbl.bit.nl rbl.suresupport.com dsn.rfc-ignorant.org ips.backscatterer.org spamguard.leadmon.net opm.tornevall.org netblock.pedantic.org black.uribl.com grey.uribl.com multi.surbl.org ix.dnsbl.manitu.net blackholes.mail-abuse.org rbl-plus.mail-abuse.org dnsbl.dronebl.org rbl.interserver.net query.senderbase.org bogons.cymru.co
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active October 10, 2025 20:20
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@zmwangx
zmwangx / Postfix: sender-dependent SASL authentication.md
Last active May 26, 2025 11:34
Postfix: sender-dependent SASL authentication — relay to multiple SMTP hosts, or relay to the same host but authenticate as different users (e.g., two Gmail accounts)

This is a sequel to "Postfix: relay to authenticated SMTP".

I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.

As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):

/etc/postfix/main.cf:
    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay