Skip to content

Instantly share code, notes, and snippets.

View avdg's full-sized avatar

Anthony Van de Gejuchte avdg

View GitHub Profile
create table general {
id INTEGER UNIQUE PRIMARY KEY,
userhash BLOB UNIQUE,
userid INTEGER,
ship TEXT,
time INT,
version TEXT,
fate TEXT,
player TEXT,
score INT,
LICENSE
Phergie/Autoload.php
Phergie/Bot.php
Phergie/Config/Exception.php
Phergie/Config.php
Phergie/Connection/Exception.php
Phergie/Connection/Handler.php
Phergie/Connection.php
Phergie/Driver/Abstract.php
Phergie/Driver/Exception.php
<?php
// A class to help work with Sessions
// In our case, primarily to manage logging users in and out
// Keep in mind when working with sessions that it is generally
// inadvisable to store DB-related objects in sessions
class Session {
private $logged_in=false;
@avdg
avdg / on master.diff
Created April 18, 2011 17:52
Current diff
diff --git a/Phergie/Plugin/Weather.php b/Phergie/Plugin/Weather.php
index c12d15e..531c8e7 100644
--- a/Phergie/Plugin/Weather.php
+++ b/Phergie/Plugin/Weather.php
@@ -32,6 +32,7 @@
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_Weather
* @link http://www.weather.com/services/xmloap.html
+ * @uses Phergie_Plugin_Cache pear.phergie.org
* @uses Phergie_Plugin_Command pear.phergie.org
@avdg
avdg / gist:939889
Created April 24, 2011 21:23
Files with DOS eol style in PPI framework
App.php
Autoload.php
Cache/Disk.php
Config.php
Dispatch.php
Helper.php
Model/Upload.php
Session.php
Vendor/Smarty/Config_File.class.php
Vendor/Smarty/internals/core.load_plugins.php
<?php
class Phergie_Plugin_Cache_Backend_SqLite extends Phergie_Plugin_Cache_Backend
{
protected $db;
protected $prepareIsset;
protected $prepareFetch;
protected $prepareStoreUpdate;
protected $prepareStoreInsert;
protected $prepareExpire;
@avdg
avdg / gist:972364
Created May 14, 2011 16:36
Getting grid to 2d problem *solved: I had declared 9 rows on such a way it was stored as 1 row and 8 others that refers to them*
def getSudoku(self):
sudoku = [[0] * 9 for x in range(9)]
for x, rows in enumerate(self.sudoku):
for y, cell in enumerate(rows):
if len(cell) == 1:
sudoku[x][y] = cell[0]
return sudoku
phpunit --coverage-html ./phpunitCache/ Request/
<html>
<head>
<style type="text/css">
body {
font-family: monospace;
background-color: #F6FFE9;
}
#code_error td.title {
font-weight: bold;
@avdg
avdg / gist:1012957
Created June 7, 2011 19:28
Git config file
[core]
excludesfile = /path/to/ignoreFile/.gitignore_global
[color]
ui = auto
[alias]
br = branch
co = checkout
df = diff
lg = log -p
lgp = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@avdg
avdg / gist:1078587
Created July 12, 2011 18:16
Phergie commits until e37bac2
279 elazar
74 Matthew Turland
47 Anthony Van de Gejuchte
31 dotEvan
29 James Logsdon
21 Evan Fribourg
17 Sean Coates
12 Dossy Shiobara
10 Graham Christensen
10 Nom4d3