Skip to content

Instantly share code, notes, and snippets.

[
{
"id": "9pz8i2yo6f",
"createdAt": "2024-02-21T10:47:12.000Z",
"userId": "9pz1x29g9t",
"user": {
"id": "9pz1x29g9t",
"name": "b96m7b3rkz",
"username": "b96m7b3rkz",
"host": "airwaves.social",
@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 October 14, 2024 03:52
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
@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