Skip to content

Instantly share code, notes, and snippets.

Philipp Speck typomedia

Block or report user

Report or block typomedia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dump.postgres.sh
#!/bin/sh
# Copyright 2015 Typomedia Foundation. All rights reserved.
# Use is subject to license terms.
#
# Postgres Dump Script v1.0
DBHOST=127.0.0.1
DBUSER=dbmaster
PASSWORD=******
DATE=`date '+%Y%m%d'`
View nginx.vhost
server {
listen 80;
server_name domain.tld;
set $root_path '/usr/share/nginx/domain.tld/public';
root $root_path;
expires 1M;
access_log /var/log/nginx/$host-access.log;
error_log /var/log/nginx/$host-error.log error;
View apache.vhost
<VirtualHost *:80>
ServerName domain.tld
ServerAlias www.domain.tld *.domain.tld
ServerAdmin webmaster@domain.tld
DocumentRoot /var/www/domain.tld
<Directory /var/www/domain.tld/>
Options FollowSymLinks MultiViews
View mysql2sqlite.sh
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
View init.syncthing.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: syncthing
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Syncthing
# Description: Automatically sync files via secure, distributed technology
# Author: Typomedia Foundation
View init.bookserver.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: bookserver
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Python Book Server
# Description: Python Book Server for Calibre Database
# Author: Typomedia Foundation
@typomedia
typomedia / pkgin.update.repo.sh
Last active May 30, 2016 — forked from jperkin/gist:3436515
Pkgin Repository Update Script
View pkgin.update.repo.sh
#!/bin/sh
# Copyright 2014 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# Pkgin Repo Update Script v1.0alpha
# Update repositories.conf for pkgin, and set $PKG_PATH for pkg_add
export PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2014Q1/x86_64/All
echo $PKG_PATH > /opt/local/etc/pkgin/repositories.conf
View mail.newfiles.vbs
' Copyright 2013 Typomedia Foundation. All rights reserved.
' Released under GPL version 3.
'
' VBS New Files Mailer v1.1
' Send a mail if files of a specific dir are newer than x minutes
Const intMin = 60 'Minutes
Set oArgs = WScript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
@typomedia
typomedia / zfs.root.dump.sh
Last active Aug 29, 2015
ZFS Dump Script
View zfs.root.dump.sh
#!/bin/sh
# Copyright 2014 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# ZFS Root Dump Script v1.0
HOST=`hostname`
DEST=/dpool/backup/OpenIndiana
DATE=`date '+%Y%m%d'`
# get last snapshot
@typomedia
typomedia / libav.h264.cmd
Last active Aug 29, 2015 — forked from typomedia/ffmpeg.h264.cmd
Libav batch converter
View libav.h264.cmd
@ECHO OFF
ECHO Copyright 2014 Typomedia Foundation. All rights reserved.
ECHO Released under GPL version 3.
ECHO Libav Transcoding Script 1.0beta
PAUSE
SET input="\\SERVER\Movies"
SET ftype=*.rip.mkv
SET suffix="h264.mkv"
You can’t perform that action at this time.