Skip to content

Instantly share code, notes, and snippets.

View gerriet-hinrichs's full-sized avatar
🚀

Gerriet Hinrichs gerriet-hinrichs

🚀
View GitHub Profile
@gerriet-hinrichs
gerriet-hinrichs / stuff.zsh-theme
Last active December 13, 2018 14:56
Custom oh-my-zsh theme
# based on the original 'clean' theme
# works best together with https://github.com/zsh-users/zsh-syntax-highlighting
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi
PROMPT='
%0(?.%{$fg[white]%}.%{$fg[red]%})Process finished with exit code %?.%{$reset_color%}
-------------------------------------------------------------------------------
[%*] %{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}%{$fg[white]%}@%M%{$reset_color%} %{$fg[blue]%}%B%c%b%{$reset_color%} $(git_prompt_info)
%(!.#.$) '
@gerriet-hinrichs
gerriet-hinrichs / cmdparser.php
Last active May 9, 2016 15:21
Small php function that parses the argv array from a string.
<?php
function parse ($cmd)
{
$out = array();
$escape = '';
$buffer = '';
$last = '';
$i = 0;
while (empty($char = mb_substr($cmd, $i++, 1)) === false)