Skip to content

Instantly share code, notes, and snippets.

View janniklorenz's full-sized avatar

Jannik Lorenz janniklorenz

View GitHub Profile
#!/bin/bash
#rsync -a --progress --exclude "Git/.*" /mnt/data/Pools/ /mnt/backup/Pools/
function copyBackup {
if [ -b /dev/disk/by-uuid/$1 ]
then
{
sudo mount /dev/disk/by-uuid/$1 /mnt/backup
#!/bin/bash
CUR_DIR=/mnt/data/Pools/Git/Public/
export GIT_ASKPASS=/bin/echo
for i in $(ls -R --directory --color=never */*.git); do
git -C "$CUR_DIR$i" fetch origin
done
#!/bin/bash
# Create path to repo
mkdir -p $(dirname $1)
# Create Bare Repo
git clone "https://github.com/$1" --bare "$1.git"
#!/bin/bash
host=$(ssh [email protected] "~/newRepo.sh $1")
./newLocalRepo.sh $1
git -C "$1" remote add "host" $host
#!/bin/bash
# Create path to repo
mkdir -p "$1"
# Create Bare Repo
git -C "$1" init
#!/bin/bash
# Create path to repo
mkdir -p "$1.git"
# Create Bare Repo
git --git-dir "$1.git" --bare init
\renewcommand{\thesubsection}{Aufgabe H\arabic{section}\Alph{subsection}}
\renewcommand\thesection{Aufgabe H\arabic{section}}
\newcommand{\Aufgabe}[1]{\section{#1}}
\newcommand{\TeilAufgabe}[1]{\subsection{#1}}
\newcommand{\Loesung}{\subsubsection*{Lösung}}
@janniklorenz
janniklorenz / nginx.conf
Created November 7, 2015 11:44 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@janniklorenz
janniklorenz / osx-for-hackers.sh
Created November 3, 2015 17:46 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
apt-get --print-uris --yes install pkgspec | grep ^\' | cut -d\' -f2 > downloads.list
wget --input-file downloads.list
http://www.tuxradar.com/answers/517