Skip to content

Instantly share code, notes, and snippets.

View spout's full-sized avatar

Stéphane Reynders spout

View GitHub Profile
@spout
spout / models.py
Created December 8, 2015 10:35
Comment trier sur les propriétés de ServerHttp en cliquant sur les entetes du tableau
# coding: utf-8
from django.db import models
class Server(models.Model):
"""
Server
"""
server = models.CharField(max_length=200)
<?php
// dangerously simple PHP regular expression URL router
// requires a mod_rewrite like "RewriteRule . /index.php [L]"
function get($url, $callback) {
$matches = array();
if (preg_match('~' . $url . '~', $_SERVER['REQUEST_URI'], $matches)) {
echo call_user_func_array($callback, $matches);
die();
}