Skip to content

Instantly share code, notes, and snippets.

@Crhistoph
Crhistoph / comicbacktogetheragainer.sh
Created April 19, 2013 12:18
Creates numbered .cbz files from image directories.
#!/bin/bash
for D in `find * -type d`
do
cd $D
zip -0 -m relative/path/to/comics/My\ Awesome\ Comic\ 0$D.cbz * >/dev/null
echo "$D zipped"
cd ../
done
@Crhistoph
Crhistoph / comicextractor.sh
Last active December 16, 2015 10:19
Reads a directory for .cbr and .cbz files, extracts accordingly.
#!/bin/bash
for file in *
do
: $((n = $n + 1))
if [[ $file == *.cbr ]]
then
mkdir "$n"
mv "$file" "$n"
cd $n
@Crhistoph
Crhistoph / .msmtprc
Created July 14, 2012 23:38
Fastmail and msmtp
account default
host mail.messagingengine.com
from [email protected]
auth on
user [email protected]
password password
tls on
tls_trust_file /usr/share/ca-certificates/mozilla/DigiCert_High_Assurance_EV_Root_CA.crt
@Crhistoph
Crhistoph / archive.html
Created July 14, 2012 15:51
Jeyll _layouts/archive.html
---
layout: default
title: archives
---
<div class="webblogPost">
<h3>Archive</h3>
<div id="weblogPostBody">
{% for month in page.months %}
<h4>{{ month | date:"%B" }} <small>{{ month | date:"%Y" }}</small></h4>
<ul>
@Crhistoph
Crhistoph / jekyll-gist-tag.rb
Created July 12, 2012 17:13
Edelabar's Gist tag for Jekyll
require 'net/https'
module Jekyll
class RenderGist< Liquid::Tag
def initialize(tag_name, url, tokens)
super
tokens = url.split(' ')
@url = tokens[0]
@Crhistoph
Crhistoph / duplicitymail.sh
Created July 11, 2012 15:59
Duplicity backup of Maildir
#!/bin/sh
export PASSPHRASE=mgpgpassphrase
export AWS_ACCESS_KEY_ID=mys3accesskey
export AWS_SECRET_ACCESS_KEY=mys3secretaccesskey
date="date +%d"
GPG_KEY="mygpgkey" #Public GPG Key