Skip to content

Instantly share code, notes, and snippets.

@daktak
daktak / musicbrainz-server.sh
Created March 28, 2014 00:17
musicbrainz chroot gentoo init script
#!/sbin/runscript
PID="/var/run/musicbrainz/server.pid"
depend() {
need net
after portmap
after iptables
after dnsmasq
}
@daktak
daktak / xvfb-run.py
Created February 5, 2014 03:23
Run a program in the X virtual frame buffer
#!/usr/bin/env python
import subprocess
import sys
from xvfbwrapper import Xvfb
vdisplay = Xvfb()
vdisplay.start()
# launch stuff inside virtual display here
@daktak
daktak / mylarToKindle.sh
Last active January 3, 2016 04:58
post processing script for Mylar (after)
#!/bin/bash
#mylar post processing
#
CALIBRE_PATH=/usr/bin
EXPECTED_ARGS=5
PORT="25"
SERVER="localhost"
ENCRYPTION_METHOD="NONE"
KINDLE_EMAIL="user@kindle.com"
FROM_EMAIL="user@email
@daktak
daktak / newsToKindle.sh
Last active January 3, 2016 02:09
Push a Calibre recipe to your Kindle
#!/bin/bash
DOWNLOAD_DIRECTORY="/pub/sabnzbd/books"
CALIBRE_PATH=/usr/bin
PORT="25"
SERVER="localhost"
ENCRYPTION_METHOD="NONE"
KINDLE_EMAIL="kindle_user@kindle.com"
FROM_EMAIL="authorized@email.com"
PROFILE="kindle_pw"
TODAY=`date --date="now" +%d/%m/%y`
@daktak
daktak / sabToKindle.sh
Last active February 18, 2023 19:24
Sabnzbd script to auto convert your epubs to mobis and send to kindle account using Calibre
#!/bin/bash
#based off
#https://github.com/ghuntley/sabToCalibre
#Requires Calibre, sabnzbd
#latest version at
#https://gist.github.com/daktak/8347325
DOWNLOAD_DIRECTORY="/pub/sabnzbd/books"
CALIBRE_PATH=/usr/bin
EXPECTED_ARGS=7
PORT="25"
@daktak
daktak / vcf-gpg-import.sh
Created August 21, 2013 06:03
Check for GPG keys for a given contact vcf file
#!/bin/bash
for n in `cat $1 | grep @ | sed 's/.*://'| sed 's/\r//'`; do gpg --keyserver pgp.mit.edu --search-keys $n; done
@daktak
daktak / .bashrc_colors
Last active December 21, 2015 06:48
.bashrc colors and kernel information
#------------------------------------------////
# Colors:
#------------------------------------------////
black='\e[0;30m'
blue='\e[0;34m'
green='\e[0;32m'
cyan='\e[0;36m'
red='\e[0;31m'
purple='\e[0;35m'
brown='\e[0;33m'
@daktak
daktak / BOPO.html
Created August 14, 2013 04:19
BoPoMoFo html table, lengthwise
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE></TITLE>
<STYLE>
td { font-size:40px }
span { font-size:20px }
@daktak
daktak / .screenrc
Last active December 30, 2018 22:39
screenrc
# set a big scrolling buffer
defscrollback 5000
# Set the caption on the bottom line
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"
defutf8 on
termcapinfo xterm* ti@:te@
term xterm-256color
@daktak
daktak / Xresources
Created July 11, 2013 02:48
color and font settings for xterm
! Use a nice truetype font and size by default...
xterm*faceName: DejaVu Sans Mono Book
xterm*faceSize: 11
! Every shell is a login shell by default (for inclusion of all necessary environment variables)
xterm*loginshell: true
! I like a LOT of scrollback...
xterm*savelines: 16384