Skip to content

Instantly share code, notes, and snippets.

View Luzifer's full-sized avatar

Knut Ahlers Luzifer

View GitHub Profile
@Luzifer
Luzifer / workflowy.user.css
Last active December 16, 2016 13:14
Custom Workflowy (Based on "Work a Simpler Flowy v2.0")
@-moz-document domain("workflowy.com") {
@import 'https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono';
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: 400;
src: local('FontAwesome'), url(//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/fonts/fontawesome-webfont.woff) format('woff');
}
#controlsLeft {
@Luzifer
Luzifer / Markdown-Thumbs.alfredworkflow
Last active January 16, 2017 09:57
This is a small Alfred workflow generating thumbs-up-Markdown to use in Pull-Requests.
@Luzifer
Luzifer / main.go
Created July 22, 2016 09:20
Test for executing commands while using a context to terminate them within a certain time
package main
import (
"log"
"os/exec"
"strconv"
"time"
"golang.org/x/net/context"
)
@Luzifer
Luzifer / README.md
Last active February 3, 2017 22:41
Publishing lastpass-cli in most recent version into PPA

How to use

I'm using this script to build the package inside a Docker container:

# docker run --rm -ti ubuntu

Afterwards the container needs some preparations:

@Luzifer
Luzifer / vault-sshadd.sh
Created April 8, 2016 13:23
vault-sshadd script to unlock SSH keys using Vault stored passwords #blog
#!/bin/bash
COLOR_RED="\033[0;31m"
COLOR_GREEN="\033[0;32m"
COLOR_CYAN="\033[0;36m"
COLOR_PLAIN="\033[0m"
function error {
echo -e "${COLOR_RED}$@${COLOR_PLAIN}"
}
@Luzifer
Luzifer / vault-gpg.sh
Created April 8, 2016 12:59
vault-gpg script to unlock GPG keys using Vault stored passwords #blog
#!/bin/bash
KEY=$1
if [ -z "${KEY}" ] || ! (gpg --list-secret-keys | grep -q ${KEY}); then
echo "No key given or no secret key found for '${KEY}'"
exit 2
fi
# Read password for this key
@Luzifer
Luzifer / lpass-ssh.sh
Last active January 14, 2020 15:03
`lpass-ssh` wrapper script #blog
#!/bin/bash
KEY_NAME=$1
if ! ( which lpass > /dev/null ); then
echo "LastPass CLI is required."
exit 2
fi
# Require something to be passed to this command
@Luzifer
Luzifer / README.md
Last active December 28, 2015 13:08
Werbung aus einem Film schneiden mit ffmpeg

Werbung aus einem Film schneiden mit ffmpeg

Cutlist

[Cut0]
Start=584.32
Duration=1221.96
StartFrame=14608
DurationFrames=30549
@Luzifer
Luzifer / README.md
Last active August 25, 2019 12:34
Strategies for persistent data storage on CoreOS-cluster

Persistent data storage on CoreOS-cluster

Storing the data on the host machine

Data directories are created in /home/coreos and mounted into the container using volume cli options of docker run. All data the container writes is stored on the host and as long as the host persists safe against container restarts / recreates.

  • Pro
    • No effort, just create the directories and mount them into the container
  • Contra
  • Container is bound to host (unable to failover)
@Luzifer
Luzifer / main.go
Created March 4, 2015 12:38
Migrate Etherpad-Lite from MySQL to Redis
package main
import (
"database/sql"
"fmt"
"gopkg.in/redis.v2"
_ "github.com/go-sql-driver/mysql"
)