This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_rep { | |
git remote -v 2> /dev/null | \ | |
sed -e '/fetch)$/!d' | \ | |
grep "[a-zA-Z0-9_-]*/[a-zA-Z0-9_-]*\.git" -o --color=never | \ | |
sed -e 's/.git/ /' | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | \ | |
sed -e '/^[^*]/d' -e 's/* \(.*\)/î‚ \1 /' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ [phpenv:33] '[' -z '' ']' | |
+ [phpenv:34] PHPENV_ROOT=/Users/anon/.phpenv | |
+ [phpenv:38] export PHPENV_ROOT | |
+ [phpenv:40] '[' -z '' ']' | |
++ [phpenv:41] pwd | |
+ [phpenv:41] PHPENV_DIR=/Users/anon/.phpenv | |
+ [phpenv:50] export PHPENV_DIR | |
+ [phpenv:53] shopt -s nullglob | |
++ [phpenv:55] abs_dirname /Users/anon/.phpenv/bin/phpenv | |
+++ [phpenv:20] pwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This helper will switch the PHP version using phpbrew provided that there is a .php-version present | |
# Call this helper by calling it with the source command: source FILENAME | |
# NOTE: You do need to install the proper version yourself in order for this to work (phpbrew install VERSION) | |
if [ -f .php-version ] | |
then | |
VERSION=$(<.php-version) | |
printf "Loading PHP v$VERSION\n" | |
phpbrew use $VERSION | |
else | |
printf "A .php-version containing the version is needed\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment": "Setting up my mailserver records for Google Mail", | |
"Changes": [ | |
{ | |
"Action": "CREATE", | |
"ResourceRecordSet": { | |
"Name": "example.com.", | |
"Type": "MX", | |
"TTL": 300, | |
"ResourceRecords": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The current agent term is managed through the TTY_SET_FILE which only | |
# contains the name of the term currently responsible for handling all gpg | |
# UI stuff. | |
# Prior to setting up a term to function as the front-end to GPG-Agent one | |
# needs to get the agent started first | |
# The tty currently active as GPG-Agent front-end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Since I keep opening new windows and cd-ing into the right places or | |
# exporting the needed variables, I figured it would make a lot of sense | |
# to have some code do this for me... It's simply: zap, splat, teleport! | |
function zap() { | |
# make a snapshot of whatever matters at this moment :) | |
echo $PWD > "/tmp/zap.pwd" | |
echo "⚡️" | |
printenv > "/tmp/zap.env" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
environment.systemPackages = with pkgs; [ | |
virtualbox | |
]; | |
virtualisation.virtualbox.host.enable = true; | |
nixpkgs.config.virtualbox.enableExtensionPack = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from datetime import timedelta | |
from thespian.actors import * | |
# The thing is that a A1 is only truly the parent of A2 if it spawns A2. | |
# In the former implementation A1 and A2 were all spawned by the application | |
# root node and as such only reported their exit status to that node. |