Skip to content

Instantly share code, notes, and snippets.

View hanneshal's full-sized avatar

Johannes Nickel hanneshal

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";
@kendemu
kendemu / emotion-vector-3d-tsne.png
Last active April 22, 2017 03:34
Sample code for vectorizing emotion words, visualize emotion word vectors, and find most similar words for "angry".
emotion-vector-3d-tsne.png
@monkeydom
monkeydom / swiftc.sh
Last active October 24, 2015 23:50
Script to be used in a hashbang to conditionally compile and then run the swift script referenced. usage #!/usr/bin/env swiftc.sh in your swift file, and put in path
#!/bin/sh
SWIFT=$(/usr/bin/env xcrun -f swift)
SCRIPTPATH=$1
COMPILEDPATH="$SCRIPTPATH.o"
SDKPATH=$(/usr/bin/env xcrun --show-sdk-path --sdk macosx)
#compile if necessary
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@davidgtonge
davidgtonge / templates.coffee
Created September 20, 2011 06:29
Simple CoffeeScript Templating
# Simple Coffeescript Templating
# Global Object to hold the templates
window.simpleCoffeeTemplates =
# An example template
example: (a) ->
"""
<div>
<h1 class='header'>#{a.header}</h1>
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done