Skip to content

Instantly share code, notes, and snippets.

View janniklorenz's full-sized avatar

Jannik Lorenz janniklorenz

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@janniklorenz
janniklorenz / gist:c887efe77231f5edfc00
Created November 11, 2014 12:49
Xcode RunScript for Build Number (Commits-Increment)
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
IFS="-" read name value <<< "$buildNumber"
b=$(($value + 1))
buildNumber="$(git rev-list HEAD --count)-$b"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
@janniklorenz
janniklorenz / multiPull.sh
Last active August 29, 2015 14:22
Git pull in all subdirectories of the current directories.
for path in $(find . -maxdepth 1 -mindepth 1 -type d); do
git -C $path pull
done

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser

apt-get --print-uris --yes install pkgspec | grep ^\' | cut -d\' -f2 > downloads.list
wget --input-file downloads.list
http://www.tuxradar.com/answers/517
@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'
@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.
\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}}