- 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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.core.urlresolvers import reverse | |
from django.conf.urls import url, patterns | |
from common.views import AutomagicListView, AutomagicDetailView, AutomagicCreateView, AutomagicUpdateView,\ | |
AutomagicDeleteView | |
class AutomagicModel(models.Model): | |
class Meta: | |
abstract = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from django.db import models | |
class Server(models.Model): | |
""" | |
Server | |
""" | |
server = models.CharField(max_length=200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Jobs\Traits; | |
trait ExponentialBackoffTrait | |
{ | |
/** | |
* @return \Carbon\Carbon | |
* @link https://medium.com/maatwebsite/laravel-and-murphys-law-e22731be31d9 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ODOO_DATABASE='odoo' | |
ODOO_HOST='http://localhost:8069' | |
ODOO_API_USERNAME='admin@example.com' | |
ODOO_API_PASSWORD='secret' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class ObserverServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. |