master
|
|
+-------<----+----->------+
| | |
| | |
| | |
branch1 | branch2
| | |
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
""" | |
Helper classes for parsers. | |
""" | |
import datetime | |
import decimal | |
import json # noqa | |
class FromValuesToDRFJSONEncoder(json.JSONEncoder): | |
""" |
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
// inspired by datatables.net | |
// see https://datatables.net/examples/basic_init/filter_only.html for example | |
$(document).ready(function() { | |
$('#example').TableUp( { | |
"paging": true, | |
"rowsPerPageOptions": [2, 5, 10], | |
"rowsPerPage": 5, | |
"checkbox": true, | |
"search": true |
-
install postgres (on both servers)
-
omnipitr (on both servers)
- download and extract omnipitr archive
cd /var/lib/postgresql
- as postgres,
wget https://codeload.github.com/omniti-labs/omnipitr/zip/v1.3.3
- as ubuntu,
sudo apt-get install unzip
- as postgres, go to ~ and
unzip v1.3.3
- as postgres,
mkdir ~/.omnipitr
- as postgres, run sanity check (see evernote for details)
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
CREATE TABLE IF NOT EXISTS `currencies` ( | |
`id` int(11) NOT NULL auto_increment, | |
`name` varchar(64) default NULL, | |
`code` char(3) default NULL, | |
PRIMARY KEY (`id`), | |
KEY `idx_currency_name` (`currency_name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; | |
-- | |
-- Dumping data for table `currency` |
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
CREATE TABLE IF NOT EXISTS `countries` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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 | |
class TasksController extends AppController { | |
//.. code | |
public function execute_it($id) { | |
$task = $this->Tasks->get($id); | |
$_worker = envDefault('WORKER_CLASS', 'Sequential'); |
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\Exception; | |
use Cake\Core\Exception\Exception; | |
class InvalidAuthenticationException extends Exception | |
{}; |
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 | |
... | |
/** | |
* HTTP POST handler | |
* | |
* @return void|\Cake\Network\Response | |
*/ | |
protected function _post() |