Skip to content

Instantly share code, notes, and snippets.

@ffflorian
ffflorian / firefox-update.sh
Last active February 10, 2019 21:23
Update (or install) the latest Firefox
#!/usr/bin/env bash
# Update (or install) the latest Firefox
# Optimized for Debian + GNOME
# ffflorian 2017
set -e
SCRIPT_NAME="${0##*/}"
INSTALL_DIR="/opt/firefox"
EXEC_BIN="${INSTALL_DIR}/firefox"
@ffflorian
ffflorian / kmz_to_kml.sh
Last active April 11, 2017 10:30
Convert multiple kmz files to kml
#!/usr/bin/env sh
# Convert kmz to kml
# @ffflorian, 2017
# Exit on error
set -eu
if ! command -v "7z" > /dev/null; then
echo >&2 "Could not find 7z. Exiting."
exit 1
@ffflorian
ffflorian / keybindings.json
Last active October 9, 2018 08:13
Visual Studio Code Settings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+o",
"command": "workbench.action.files.openFolder"
},
{
"key": "ctrl+[IntlBackslash]",
"command": "workbench.action.terminal.toggleTerminal"
},
@ffflorian
ffflorian / build_coax.sh
Last active January 23, 2018 10:23
Build coax on Debian
#!/usr/bin/env bash
# Build script for https://github.com/wireapp/coax
set -e
RUSTUP_SCRIPT_REMOTE="https://sh.rustup.rs"
RUSTUP_SCRIPT_LOCAL="install_rust.sh"
COAX_REPO="https://github.com/wireapp/coax.git"
@ffflorian
ffflorian / wire_build_install.sh
Last active October 17, 2017 15:52
Wire Desktop Build for Debian x64 and i386
# Wire build and installation for Debian x64
# Created by @ffflorian (https://github.com/ffflorian)
# Licensed under the MIT license.
# Prerequisites:
# * You need npm, git, g++ and dpkg.
# * You need to clone https://github.com/wireapp/wire-desktop.
# Usage: Run it in the folder of the wire-desktop repo.
@ffflorian
ffflorian / gh-open.sh
Last active September 5, 2017 11:28
Print or browse a git repository's URL.
#!/usr/bin/env bash
# Print or browse a git repository's URL.
# @ffflorian, 2016
# MIT License
set -e
SCRIPT_NAME="${0##*/}"
_print_usage() {
@ffflorian
ffflorian / appname.service
Created September 1, 2016 16:22
Example systemd service for a node.js app
# Create at /etc/systemd/system/ or ~/.config/systemd/user/
# Enable with systemctl enable appname.service
# Start with systemctl start appname.service
[Unit]
Description=Appname
# wait for network
After=network.target
[Service]
@ffflorian
ffflorian / spon.js
Last active January 18, 2024 10:59
Spiegel Online Paywall
/**
* Read Spiegel Online Plus Articles, hidden behind a rot(1) "encryption"
* and a blur filter.
* Just copy this and paste it into your browser's console (press F12) -
* or use the minified version, see comments below.
* Try it out on any article at http://www.spiegel.de/spiegelplus/.
*
* @ffflorian, 2016
*/
@ffflorian
ffflorian / encrypt.js
Created July 10, 2016 11:54
Simple OpenPGP.js example with Promises for node.js
/*
* Simple OpenPGP.js example with Promises for node.js
* See: https://github.com/openpgpjs/openpgpjs
*/
'use strict';
const fs = require('fs');
const openpgp = require('openpgp');
const keyFile = 'pubkey.asc';
@ffflorian
ffflorian / dynv6.sh
Last active January 3, 2017 22:13
dynv6.net updater
#!/usr/bin/env bash
# Usage: dynv6.sh --token TOKEN --name NAME1,NAME2
# Created by @ffflorian (https://github.com/ffflorian)
# Licensed under the MIT license.
SCRIPT_NAME="${0##*/}"
_print_usage() {
cat <<EOF