Skip to content

Instantly share code, notes, and snippets.

@olivergondza
olivergondza / .bashrc
Last active February 23, 2019 10:36
Shell env
#!/bin/bash
# Set a default shell prompt:
function promptcmd() {
ret=$?
rst='\[\e[0m\]'
if [[ $ret = 0 ]]; then
color='\[\e[0;32m\]'
ret=''
else
@olivergondza
olivergondza / refre.sh
Created July 11, 2013 19:42
Refresh FS based Jenkins update center
#!/bin/bash
if [ $# -ne 1 ]; then
echo "No update_center_id provided" >&2
echo "Usage: $0 <update_center_id>" >&2
exit 1
fi
rm -r /var/www/$1/*
@olivergondza
olivergondza / DefaultArgs.php
Created May 29, 2012 17:24
Testcase for undocumented PHP feature allowing to use default argument values in the middle of the argument list
<?php
/**
* Declarations of necessary classes and functions
*/
class ClassA {}
class ClassB {}
class ClassC {}
function argsFirst (
@olivergondza
olivergondza / d.jsf
Created June 17, 2011 21:28
JOE syntax highlight file for D programming language
# JOE syntax highlight file for D programming language
=Idle
=Bad bold red
=Comment green
=Constant cyan
=Escape bold cyan
=Type bold
=Keyword bold
=Brace magenta