- You can replace
dockerproject
with whatever project namespace you are using. - Be sure to use same value for
network
in docker-compose. - In docker-compose files are referenced in an existing directory
docker
.- Make sure to create these files inside
docker
directory on same level ofdocker-compose.yml
file and replace-
with subdirectory from this gist. For exmaple:- Create
docker/nginx/dockerproject.conf
file to usedocker-nginx-dockerproject.conf
.
- Create
- Make sure to create these files inside
- Make sure that the
root
path matches public directory of your framework/code that will serve the fronte page of application. - Access mysql database on port
3307
assuming you might already have a local instance running at3306
. - Access application in your browser at port
8001
. You can change this undernginx
section in docker-compose file.
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
// clearfix | |
@mixin clearFix() { | |
&:before, | |
&:after { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} |
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
/(^[+][0-9]{11,12})$|^(^0{1}(?![0])[0-9]{9})$|(^0{2}[0-9]{11,12})$/g |
Then in your controller
, inject $polling
and start polling like this.
General use
$polling.startPolling({name_of_this_polling}, {url_to_fetch_data_from}, {time_in_milli_seconds}, {callback});
Example,
$polling.startPolling('fetchNotifications', 'http://localserver.local/fetch/notifications', 10000, $scope.processData);
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 | |
define("DB_HOST", "localhost"); | |
define("DB_NAME", "db_name"); | |
define("DB_USER", "root"); | |
define("DB_PASSWORD", ""); | |
define("CSV_FILE", "file.csv"); | |
$db = new PDO("mysql:host=" . DB_HOST . ";dbname=" . DB_NAME . "," . DB_USER . "," . DB_PASSWORD); |
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
namespace Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController, | |
Lists\Entity\Lists; | |
class IndexController extends AbstractActionController | |
{ | |
public function indexAction() | |
{ |
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
// Paste this code in browser console to debug ui-router problems when navigating through states. | |
var $rootScope = angular.element(document.querySelectorAll("[ui-view]")[0]).injector().get('$rootScope'); | |
$rootScope.$on('$stateChangeStart',function(event, toState, toParams, fromState, fromParams){ | |
console.log('$stateChangeStart from '+fromState.name+'- fired when the transition begins. fromState,fromParams : \n',fromState, fromParams); | |
console.log('$stateChangeStart to '+toState.name+'- fired when the transition begins. toState,toParams : \n',toState, toParams); | |
}); | |
$rootScope.$on('$stateChangeError',function(event, toState, toParams, fromState, fromParams){ |