Skip to content

Instantly share code, notes, and snippets.

View jpylypiw's full-sized avatar
⚜️
A user interface is like a joke. If you have to explain it, it's not that good.

Jochen P. jpylypiw

⚜️
A user interface is like a joke. If you have to explain it, it's not that good.
View GitHub Profile
@ThomasLeister
ThomasLeister / rspamd-whitelisting.md
Last active May 9, 2024 10:49
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
@jpylypiw
jpylypiw / update_check_mk_agent.sh
Last active July 2, 2024 18:01
Check_MK Agent Update Script
#!/bin/bash
# this script works with the latest version of Check_MK. Tested using Raw 1.6.0b7 on Debian and RedHat.
# be sure that curl is installed!
# apt install -y curl
# yum install -y curl
# use the script with these steps:
# curl -Os -H 'Cache-Control: no-cache' https://gist.githubusercontent.com/jpylypiw/f55352de920b75cccbe6e50c6ad4b4cd/raw/update_check_mk_agent.sh
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 16, 2024 16:25
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@adamrunner
adamrunner / gen_cert.sh
Created March 31, 2016 18:26
bash script to generate a self signed certificate for development use
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite