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
var helpers = require('../components/helpers'); | |
var app = express(); | |
app.set('helpers', helpers); |
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 | |
class BdController | |
{ | |
private $_instance = null ; | |
public function __construct() | |
{ | |
$this->_instance = new PDO('mysql:host=127.0.0.1; dbname=pa_tp1','root', ''); | |
} |
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 | |
require_once __DIR__.'/../vendor/autoload.php'; | |
require_once __DIR__.'/boot.php'; | |
use Silex\Application; | |
use Symfony\Component\HttpFoundation\Request; | |
use Synfony\Component\HttpFoundation\Response; | |
$app = new Application(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Composer Targets" default="build"> | |
<property name="builddir" value="${basedir}/build"/> | |
<property name="composer" value="${builddir}/composer.phar"/> | |
<target name="php-check"> | |
<condition property="php" value="php"> | |
<not> | |
<isset property="${php}"/> |
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
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
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
Following these instructions you would get three virtual machines , whereas one would be a server (ansible machine) | |
from where ansible would install software into two remaining virtual machines (destination servers). | |
Prerequsets (installed on a host machine): | |
- virtual box | |
- vagrant | |
List of software which will be installed on the destination servers (basic list, some dependencies will be installed as well): | |
- git |
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
To be able to use Fabric for deploy you must have some things done: | |
- you need to be able to ssh to the server where the deployemnt is meant to be done. | |
- your Python version should match a certain required one | |
- you must have `pip` installed | |
- you must have `virtualenv` installed | |
- you must have `fabric` installed inside your virtual environment (please read about virtual env below) | |
Note about SSH: Basically Fabric uses ssh to connect to the sever so before you even | |
start with Fabbric please make sure your computer (user) public key is added to the | |
server's authorized hosts and you are able to ssh to the server without prompting |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title></title> | |
<link rel="stylehsheet" href=""> | |
</head> | |
<body> | |
</body> |
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 __future__ import with_statement | |
from fabric.api import local, env, settings, abort, run, cd | |
from fabric.contrib.console import confirm | |
import time | |
# Please create this directory on your production server | |
code_dir='/var/www/deploy-stage' | |
# Please make sure this directory exists and contains uploaded files | |
# most of the cases it is a good idea to keep your uploads apart from your source code |
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
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "No destination path is given" | |
exit 1 | |
fi | |
if [ -z "$2" ] | |
then |
OlderNewer