Enabling this schedule on all multi-branch pipeline build jobs helps with maintaining consistency between the code repository and Jenkins.
There is not a way to set this through a Jenkinsfile nor run this from inside a build job (reference).
The
Enabling this schedule on all multi-branch pipeline build jobs helps with maintaining consistency between the code repository and Jenkins.
There is not a way to set this through a Jenkinsfile nor run this from inside a build job (reference).
The
<?php | |
// I made this array by joining all the following lists + .php extension which is missing in all of them. | |
// please contribute to this list to make it as accurate and complete as possible. | |
// https://gist.github.com/plasticbrain/3887245 | |
// http://pastie.org/5668002 | |
// http://pastebin.com/iuTy6K6d | |
// total: 1223 extensions as of 16 November 2015 | |
$mime_types = array( | |
'3dm' => array('x-world/x-3dmf'), | |
'3dmf' => array('x-world/x-3dmf'), |
SQL: | |
== | |
UPDATE `ezuser_setting` SET `is_enabled` = '1' WHERE `ezuser_setting`.`user_id` =14; | |
UPDATE `ezuser` SET `password_hash` = 'bab77ccf06f0b1f982e11c60f344c3c2' WHERE `ezuser`.`contentobject_id` =14; | |
SITE.INI: | |
== | |
[UserSettings] | |
HashType=md5_user |
$searchText = $request->query->get('SearchText'); | |
$sort = array( 'modified' => 'false' ); | |
$contentTypeIdenfiers = array( 31 ); | |
$searchResult = $this->getLegacyKernel()->runCallback( | |
function () use ( $searchText, $sort, $contentTypeIdenfiers ) | |
{ | |
// eZFunctionHandler::execute is the equivalent for a legacy template fetch function | |
// The following is the same than fetch( 'content', 'search', hash(...) ) | |
return eZFunctionHandler::execute( |
<?php | |
protected function execute(InputInterface $input, OutputInterface $output) { | |
$repository = $this->getContainer()->get('ezpublish.api.repository'); | |
$legacyKernel = $this->getContainer()->get('ezpublish_legacy.kernel'); | |
$userID = 14; // UserID of the Default Admin User | |
$user = $repository->getUserService()->loadUser( $userID ); | |
$repository->setCurrentUser( $user ); | |
$result = $legacyKernel()->runCallback( | |
function () use( $userID ) |
<?php | |
namespace My\DesignBundle\Controller; | |
use eZ\Bundle\EzPublishCoreBundle\Controller; | |
use eZ\Publish\Core\MVC\Symfony\Routing\RouteReference; | |
class LanguageSwitcherController extends Controller | |
{ | |
public function languagesAction( RouteReference $routeReference ) | |
{ |
@admin_api.route('/help', methods=['GET']) | |
def routes_info(): | |
"""Print all defined routes and their endpoint docstrings | |
This also handles flask-router, which uses a centralized scheme | |
to deal with routes, instead of defining them as a decorator | |
on the target function. | |
""" | |
routes = [] | |
for rule in app.url_map.iter_rules(): |
This demonstrates that you can configure a Flask application through Flask-Script, without having to create a Flask instance or deal with circular dependencies. Note that Flask-Script's Manager accepts a factory function in place of a Flask app object.
Running:
python manage.py runserver
gives "Hello, world!" on http://localhost:5000/, while running:
python manage.py runserver -c development.cfg
class FlaskWithRouteDocs(Flask): | |
"""A subclass of Flask to allow using :route: and :methods: in docstrings, a la Sphinx.""" | |
def route(self, rule, **options): | |
def decorator(f): | |
route_dec = super(FlaskWithRouteDocs, self).route(rule, **options) | |
methods_str = ','.join(options.get('methods', ['GET'])) | |
if f.__doc__ is not None and ":route:" in f.__doc__: | |
f.__doc__ = f.__doc__.replace(":route:", rule) | |
else: |
#!/bin/bash | |
gunicorn="/usr/local/bin/gunicorn" | |
prog="dev.maroo.info" | |
PROJECT_HOME="/home/maroo/sites/$prog" | |
pid="/var/lock/$prog" | |
RETVAL=0 | |
start() { |