Edit file /home/gitlab/gitlab/config/unicorn.rb
Find line listen "#{app_dir}/tmp/sockets/gitlab.socket"
and comment it.
Uncomment line listen "127.0.0.1:8080"
sudo a2enmod proxy
sudo a2enmod proxy_balancer
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys, re | |
import os.path | |
""" The CSS classname/namespace prefix to prepend to all Bootstrap CSS classes """ | |
CSS_CLASS_PREFIX = 'ns-' | |
# Not all CSS classes that are referenced in JavaScript are actually defined in the CSS script. |
<?php | |
namespace Application; | |
use Locale; | |
use Zend\EventManager\Event; | |
use Zend\ModuleManager\Feature; | |
class Module implements | |
Feature\BootstrapListenerInterface | |
{ |
<?php | |
return array( | |
// .. | |
'service_manager' => array( | |
'factories' => array( | |
'translator_adapter' => function($serviceManager) { | |
return new Zend\Translator\Adapter\Tmx(array( | |
'locale' => 'auto', | |
'content' => __DIR__.'/../language/language.xml' | |
)); |
(function( $ ) { | |
$.fn.simulateDragDrop = function(options) { | |
return this.each(function() { | |
new $.simulateDragDrop(this, options); | |
}); | |
}; | |
$.simulateDragDrop = function(elem, options) { | |
this.options = options; | |
this.simulateEvent(elem, options); | |
}; |
<?php | |
namespace Application\Event; | |
use Zend\EventManager\StaticEventManager, | |
Zend\EventManager\EventDescription, | |
Application\Event\Exception\ForbiddenException, | |
Application\Event\Exception\UnexpectedValueException, | |
Humus\Di\Locator; |
<?php | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |
This document describes how a system can be formed to set up modules in combination with a tree of pages stored in the database. The general idea is to have pages stored within a database in a tree structure, where every page is coupled to a module (1:n). Pages are queried and parsed to routes as a combination of the page route and the modules route(s).
Webapplications exist often with a frontend (for normal visitors) and backend (to manage the whole bunch). Also some pages might want to utilize the same module (two simple text pages as basic example). Thirdly, it should be easy for end users to create new pages, modify them or delete pages. To accomplish this, a robust system ("content management framework") should be made on top of zf2 to accomodate this.
<?php | |
// broken | |
class IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase | |
{ | |
public function setUp() | |
{ | |
parent::setUp(); | |
$this->bootstrap = new Zend_Application( | |
APPLICATION_ENV, | |
APPLICATION_PATH . '/configs/application.ini' |