Skip to content

Instantly share code, notes, and snippets.

View avdg's full-sized avatar

Anthony Van de Gejuchte avdg

View GitHub Profile
Serve static content from a cookieless domain (17)
3.70KB of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:
css.php
bg-body-bg.png
bg-header-bg.png
bg-header-shadow.png
bg-header-page.png
icons-logo.png
github.png
ppi.png
There were 2 failures:
1) Phergie_Plugin_MessageTest::testMessages with data set #6 ('foo bar', 'foo bar', true, NULL)
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-foo bar
+
@avdg
avdg / playgame.sh
Created November 30, 2011 15:56
Path bug (check paths in replay.0.html)
#!/usr/bin/env sh
../../aichallenge/aichallenge/ants/playgame.py --player_seed 42 --end_wait=0.25 --log_dir game_logs --turns 1000 --map_file ../../aichallenge/aichallenge/ants/maps/maze/maze_04p_01.map "./MyBot" "python ../../aichallenge/aichallenge/ants/dist/sample_bots/python/LeftyBot.py" "python ../../aichallenge/aichallenge/ants/dist/sample_bots/python/HunterBot.py" "python ../../aichallenge/aichallenge/ants/dist/sample_bots/python/GreedyBot.py" -IOE
run: function() {
//this.trySomethingALittleBitSmarter();
this.tryToFillStomach();
},
# Forum rank table
# Format:
# Player name <tab> Player id <tab> Forum link
#
# Script:
# - Want:
# <link aichallenge>final rank</link> <link forum>name</link forum>
# Page 1
<?php
// Example code
abstract class PPI_Array_Rename {
/*
spl array binder methods which uses the translator method
*/
/* @returns string */
@avdg
avdg / gist:2210109
Created March 26, 2012 22:03
Bootstrap popover triggered by hover, fading away in few seconds
var tmp = null;
$('###selector###').popover({
trigger: 'manual',
title: 'testing',
delay: {show:500, hide:100}
});
$('###selector###').hover(function(){
clearTimeout(tmp);
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SPACE PONG ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Player a: Use S and X ;;
; Player b: Use H and N ;;
; HOLD DOWN A KEY TO START THE GAME ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GOAL ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Be the real captain ;;
PAGE = "<page:(?:/([a-zA-Z0-9-][a-zA-Z0-9_-]*/?)*)?>"
VERSION = "<version:(?:\:[\d]+)?>"
WIKIURL = PAGE + VERSION
# Note htmlFilter is WiP (Work in Progress) ;-)
import cgi
buf_re = {
'basicTags': re.compile( \
r'&lt;(' \
r'/?(b|c(ite|ode)|d([dlt]|el)|em|h[0-6]|i(ns)?|li|marquee|ol|p|' \
r's(mall|tr(ike|ong)|u[bp])?|t(able|[dhrt])|u[lm]?)|[bh]r'
r')\s*&gt;'),
'closingComplexTags': re.compile('&lt;/(a)&\s*gt;'),