Skip to content

Instantly share code, notes, and snippets.

View spout's full-sized avatar

Stéphane Reynders spout

View GitHub Profile
@spout
spout / pgx.rst
Created April 1, 2016 21:23 — forked from runekaagaard/pgx.rst
Bash scripts for extracting individual databases from a sql file dumped using pg_dumpall

Postgresql Xtra commands

  • pgx_list_dbs: Lists the names of databases in an .sql file dumped using pg_dumpall.
  • pgx_extract_db: Extracts a single database from a sql file dumped with pg_dumpall and outputs its content to stdout.

Installation

@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();
}