Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
svncolor='{a["A"]=32;a["U"]=34;a["C"]=31;a["M"]=34;a["G"]=37;a["?"]=33;a["D"]=36;printf("\033[1;%sm%s\033[0;00m\n",a[$1],$0)}';
revision=`svn info ../ --non-interactive | grep Revision | awk '{print $2}'`
prev=$revision
next=$revision
echo -e "\e[32m!!!\e[m current revision is: \e[32m$revision\e[m"
while true; do
revision=`svn info ../ --non-interactive | grep Revision | awk '{print $2}'`
@hpbuniat
hpbuniat / css-shredder.sh
Created June 3, 2011 10:51
Alpha Version of CSS-Shredder inspired by Nicole Sullivan-Haas
#!/bin/bash
IFS=$'\n'
echo "CSS-Shredder"
echo "---------------------------------------------------"
if [ -z "$1" ]; then
echo "Name des Ordners?"
read PORTAL
else
PORTAL=$1
@hpbuniat
hpbuniat / css-specificity.php
Created June 6, 2011 10:53
Although named CssSpecificity, it finds dupes. Aims to find over-specificityfied (and so unused) rules.
<?php
/**
* Some Css-Tests
*/
class CssSpecificity {
/**
* Css-Content
*
* @var string
@hpbuniat
hpbuniat / popunder.html
Created June 12, 2011 19:44
Test for a popunder working in ff 3-14, chrome 10-21, ie6-9
<!DOCTYPE html>
<html>
<head>
<meta content="Hans-Peter Buniat" name="author">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Form-Submit Popunder</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<form id="testSubmit" action="http://www.google.com">
@hpbuniat
hpbuniat / ParallelTest.php
Created July 6, 2011 12:02
Wrapper for selenium-tests, to execute tests in parallel
<?php
/**
* Wrapper for selenium-tests, to execute tests in parallel
*
* @author Hans-Peter Buniat <[email protected]>
* @copyright 2011-2012 Hans-Peter Buniat <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
class ParallelTests {
@hpbuniat
hpbuniat / closure-wrapper.php
Last active September 28, 2015 05:18
Simple wrapper for google closure compiler
<?php
/**
* Simple Closure-Compiler Wrapper
* @author Hans-Peter Buniat
*/
class ClosureCompile {
/**
* The Files to work on
*
@hpbuniat
hpbuniat / usort.php
Created November 28, 2011 11:53
usort is bad
<?php
$aOpts = getopt('i:');
if (empty($aOpts['i']) === true) {
$aOpts = array(
'i' => 10000
);
}
$aValues = range(0, $aOpts['i'], 1);
shuffle($aValues);
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('max_execution_time', 0);
ini_set('memory_limit', '256M');
/**
* Test for http://instagram-engineering.tumblr.com/post/12651721845/instagram-engineering-challenge-the-unshredder
*
* @author Hans-Peter Buniat
@hpbuniat
hpbuniat / popunder.html
Created March 17, 2012 12:18
Popunder working in ff 3-12, chrome 10-18, ie6-9 with cookie support
<!DOCTYPE html>
<html>
<head>
<meta content="Hans-Peter Buniat" name="author">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Form-Submit Popunder with Cookie support</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!-- Cookie support -->
<script type="text/javascript" src="https://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js"></script>
@hpbuniat
hpbuniat / iframeclick.html
Created May 7, 2012 15:48
Test for tracking clicks within an iframe
<!DOCTYPE html>
<html>
<head>
<meta content="Hans-Peter Buniat" name="author">
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>test iframe clicks</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var f = {