Skip to content

Instantly share code, notes, and snippets.

View typomedia's full-sized avatar

Philipp Speck typomedia

View GitHub Profile
@typomedia
typomedia / neos.nginx.vhost
Last active January 24, 2018 22:47 — forked from iwyg/neos.dev.conf
NGINX Virtual Host for NEOS 2.0/FLOW3
server {
listen 80;
server_name domain.tld;
root /usr/share/nginx/domain.tld/Web;
autoindex off;
access_log /var/log/nginx/$host-access.log;
error_log /var/log/nginx/$host-error.log error;
#!/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
#!/bin/sh
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# MySQL Dump Script v1.0
DBHOST=localhost
DBUSER=root
PASSWORD=******
DATE=`date '+%Y%m%d'`
#!/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'`
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;
<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
#!/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
#!/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
#!/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 03:42 — forked from jperkin/gist:3436515
Pkgin Repository Update Script
#!/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