Skip to content

Instantly share code, notes, and snippets.

View Xunnamius's full-sized avatar
🐕

Bernard Xunnamius

🐕
View GitHub Profile
@Xunnamius
Xunnamius / introrx.md
Created November 3, 2022 20:24 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Xunnamius
Xunnamius / ANSI-Test.sh
Created October 21, 2022 07:09 — forked from mxmerz/ANSI-Test.sh
Shell script to test support of ANSI color and style codes
# ANSI Start Codes
# Styles.
Normal="\x1b[0m"
Bold="\x1b[1m"
Faint="\x1b[2m"
Italic="\x1b[3m"
Underline="\x1b[4m"
Blink_Slow="\x1b[5m"
Blink_Rapid="\x1b[6m"
@Xunnamius
Xunnamius / crypto-pbkdf2-example.js
Created July 1, 2021 04:18 — forked from skeggse/crypto-pbkdf2-example.js
Example of using crypto.pbkdf2 to hash and verify passwords asynchronously, while storing the hash and salt in a single combined buffer along with the original hash settings
var crypto = require('crypto');
// larger numbers mean better security, less
var config = {
// size of the generated hash
hashBytes: 32,
// larger salt means hashed passwords are more resistant to rainbow table, but
// you get diminishing returns pretty fast
saltBytes: 16,
// more iterations means an attacker has to take longer to brute force an
@Xunnamius
Xunnamius / equal-width.md
Created May 14, 2021 02:40 — forked from panoply/equal-width.md
2 column full width table for github markdown

Equal widths

Github markdown full-width 2 column table.

@Xunnamius
Xunnamius / unbound.conf
Created May 11, 2021 10:59 — forked from MatthewVance/unbound.conf
Config for running Unbound as a caching DNS forwarder (performance settings optimized for Raspberry Pi 2).
server:
###########################################################################
# BASIC SETTINGS
###########################################################################
# Time to live maximum for RRsets and messages in the cache. If the maximum
# kicks in, responses to clients still get decrementing TTLs based on the
# original (larger) values. When the internal TTL expires, the cache item
# has expired. Can be set lower to force the resolver to query for data
# often, and not trust (very large) TTL values.
cache-max-ttl: 86400
@Xunnamius
Xunnamius / unbound.conf
Created May 11, 2021 10:15 — forked from lepiaf/unbound.conf
Unbound configuration IPv4 and IPv6
server:
interface: 0.0.0.0
interface: ::0
access-control: 192.168.42.0/24 allow
access-control: 127.0.0.0 allow
access-control: 2001:db8:dead:beef::/48 allow
# unbound optimisation
num-threads: 4
@Xunnamius
Xunnamius / rspamd-whitelisting.md
Created February 27, 2021 02:28 — forked from ThomasLeister/rspamd-whitelisting.md
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";