Skip to content

Instantly share code, notes, and snippets.

View fannar's full-sized avatar
🎯
making

fannar fannar

🎯
making
  • Internet
View GitHub Profile
@fannar
fannar / README.md
Created August 5, 2025 16:52 — forked from seanorama/README.md
certutil/nssdb

How to work with nssdb and certutil

remove database

rm -r ~/.pki/nssdb

create database directory

@fannar
fannar / Anonymising-PDFs-README.md
Last active October 25, 2024 13:00 — forked from hubgit/README.md
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@fannar
fannar / mxf-folder2mp4.sh
Created May 3, 2023 15:35 — forked from alexarje/mxf-folder2mp4.sh
Convert a folder of MXF files to one MP4 file with FFmpeg
#!/bin/bash
# Script for converting a folder of MXF video files to different to a single MP4 file.
# Alexander Refsum Jensenius, RITMO, University of Oslo
# v0.1 2019-11-03
# Find and move all MXF files to the "root" (where the script is run from)
find . -name "*.MXF" -exec mv {} . ";"
# Create list of files to be used for concatenation
@fannar
fannar / apns.md
Last active March 10, 2022 23:35 — forked from greencoder/apns.sh
Curl the APNS http/2 API

Note: You MUST have curl 7.47+ with http/2 support compiled in

PEM

Convert P12 to PEM: openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts

curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
@fannar
fannar / encrypt_openssl.txt
Created March 8, 2022 13:11 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.
@fannar
fannar / mpv.conf
Created April 17, 2020 00:47 — forked from shabbir-hasan/mpv.conf
MPV Configuration (mpv.conf) on Windows 10 Pro
# vim: syntax=config
###########
# General #
###########
priority=high
input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket
load-stats-overlay=yes # use local stats.lua
@fannar
fannar / mpv.conf
Created April 17, 2020 00:47 — forked from iGlitch/mpv.conf
my mpv config
###########
# General #
###########
vo=libmpv
cocoa-force-dedicated-gpu=yes
#load-stats-overlay=no
# OpenGL settings
gpu-api=opengl
@fannar
fannar / arch-systemd-rbenv-passenger-nginx.md
Created May 30, 2016 13:21 — forked from 46bit/arch-systemd-rbenv-passenger-nginx.md
Arch Linux and Systemd: Rbenv, Passenger and Nginx

Arch Linux and Systemd: Rbenv, Passenger and Nginx

Rbenv

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
@fannar
fannar / openemu_single_file_archives.md
Created May 30, 2016 10:15 — forked from funkatron/openemu_single_file_archives.md
converting 7zip files with multiple ROMs to individual files for OpenEmu usage

I use Homebrew for package management, so the instructions here work with that. You could probably get p7zip and atool another way if you want.

  1. install p7zip with homebrew: brew install p7zip
  2. install atool with homebrew: brew install atool
  3. extract individual files from .7z archives to current directory: atool -X . -e -E *.7z
  4. delete or move the .7z files: rm *.7z
  5. archive each file into its own ZIP archive using find and atool: find . -d 1 -type f -exec atool -a -F 7z -E -e {} ';'
  6. delete the uncompressed rom files. They should have a common file extension, which you'll need to change depending on the ROM type. For example, I needed to delete a bunch of .gb and .gbc files: rm *.gb; rm *.gbc

Keybase proof

I hereby claim:

  • I am fannar on github.
  • I am fannar (https://keybase.io/fannar) on keybase.
  • I have a public key whose fingerprint is 40BB B9C9 7E42 3FA0 4C58 94F4 04D9 977E 6F8C 26C5

To claim this, I am signing this object: