This file contains hidden or 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. |
This file contains hidden or 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='[email protected]' | |
ODOO_API_PASSWORD='secret' |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |