Skip to content

Instantly share code, notes, and snippets.

@spirillen
spirillen / trace.log
Created December 20, 2023 00:46
PowerDNS Recursor RPZ trace log for
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: 2 [20/1] question for 'iod.at|A' from 127.0.0.1:50436
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: : no TA found for 'iod.at' among 1
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: : no TA found for 'at' among 1
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: : got TA for '.'
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: QM iod.at.|A child=(empty): doResolve
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: iod.at: Wants DNSSEC processing, auth data in query for 1
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: iod.at: Recursion not requested for 'iod.at|1', peeking at auth/forward zones
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: QM iod.at.|A child=(empty): Step0 Not cached
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: iod.at: Checking if we have NS in cache for 'iod.at'
Dec 19 15:35:39 ns3109441 pdns-recursor[2704388]: iod.at: no valid/useful NS in cache for 'iod.at'
@spirillen
spirillen / policies.json
Created September 12, 2023 23:52
Example on a Firefox ESR setting files in relation to https://infosec.exchange/@iampytest1/111042104329673915
{
"policies": {
"AppAutoUpdate": true,
"AutoLaunchProtocolsFromOrigins": [
{
"protocol": "http",
"allowed_origins": [
"http://example.org"
]
}
@spirillen
spirillen / ffmpeg-add-subtitles.md
Last active June 10, 2024 23:11
Use FFmpeg to add subtitles to video

Use FFmpeg to add subtitles to video

MP4:

ffmpeg -i input.mp4 -f srt -i input.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy \
    -c:a copy -c:s mov_text output.mp4

MKV:

@spirillen
spirillen / convert_to_m4a.sh
Last active May 6, 2020 20:21
Convert almost any media by extension to m4a
#!/usr/bin/env bash
# This script convert flac files into ALAC m4a
# Execute it by calling this script and append full path to dir as
# flac_mp4.sh "/media/joakim/VERBATIM/Avril Lavigne/"
# you can use "${PWD}" if you which to execute this script from
# current dir
# exit on any errors

Keybase proof

I hereby claim:

  • I am spirillen on github.
  • I am spirillen (https://keybase.io/spirillen) on keybase.
  • I have a public key ASCBBL-lkbz5wB6lf9e7yjiitUjFw1lP5ONwIYIX2OyQ6Qo

To claim this, I am signing this object:

@spirillen
spirillen / nftable.sh
Created May 16, 2019 20:18
The new types for nftable over old iptableshttps://bitbucket.org/snippets/spirillen/neG47k
#!/usr/bin/env bash
# Copyright
# GNU AGPLv3, MODIFIED FOR NON COMMERCIAL USE
# This script is published at https://bitbucket.org/snippets/spirillen/neG47k
# Import a bunch of busted busters by there AS.
# This script will block the following privacy fuckers
# Google.tld facebook.tld, TDC and Fullrate
@spirillen
spirillen / GitRepoUpdateTimestamp.sh
Created March 27, 2019 16:45 — forked from jeffery/GitRepoUpdateTimestamp.sh
Update Timestamp of files in Checked-out Git Repository
#!/bin/bash -e
####
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
# Web application have a proper cacheing mechanism so that it can re-cache files
@spirillen
spirillen / travis-ci-git-commit.bash
Created March 25, 2019 17:42 — forked from mitchellkrogza/travis-ci-git-commit.bash
Make a commit on a branch in a Travis CI build, dealing with detached HEAD state safely
#!/bin/bash
# function to make a commit on a branch in a Travis CI build
# be sure to avoid creating a Travis CI fork bomb
# see https://github.com/travis-ci/travis-ci/issues/1701
function travis-branch-commit() {
local head_ref branch_ref
head_ref=$(git rev-parse HEAD)
if [[ $? -ne 0 || ! $head_ref ]]; then
err "failed to get HEAD reference"
return 1