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 | |
public function setUpServices() | |
{ | |
$this->services = [ | |
'twig.loader' =>[ | |
'class' => '\Twig_Loader_Filesystem', | |
'arguments' => [__DIR__.'/views'] | |
], | |
'twig.templating' => [ | |
'class' => '\Twig_Environment', |
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 | |
$templating = $container->get('twig.templating'); | |
$page = $templating->render('index.twig.html', ['hell' => 'Yeah!']); |
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
{ | |
"name": "evista/localpackage", | |
"description": "A local package for testing", | |
"keywords": [ | |
"test" | |
], | |
"homepage": "https://github.com/serabalint/formista", | |
"license": "MIT", | |
"authors": [ | |
{ |
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
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "ssh://username@server:2222/home/git/localpackage.git" | |
} | |
], |
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 | |
header("Content-Type: text/plain", true, 200); | |
echo "Deploying...\n"; | |
$projectRoot = __DIR__; | |
chdir($projectRoot); | |
// A user must be set up who can write the docroot |
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
package main | |
import mgo "gopkg.in/mgo.v2" | |
// Persist is a persisting dependency | |
type Persist interface { | |
Insert() (err error) | |
Update() (err error) | |
Remove() (err error) | |
} |
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 | |
// inside a PHP tag | |
if (true) { | |
print "true"; | |
} | |
?> | |
<!-- mixed with markup: alternative syntax --> | |
<?php if (true): ?> | |
<p>true</p> |
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
// Self executing function base form | |
const CartOps = (function(injectedDependency) { | |
// public (see api) | |
const config = { | |
selectors: { | |
addToCartForm: '.add-to-cart-form', | |
}, | |
}; | |
// private (missing from api) |
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
# Replace image tag (after the semicolon) with whatever version you need | |
FROM php:5.6-cli | |
EXPOSE 8080 | |
# Legacy and oldschool apps like Wordpress needs this extension | |
# RUN docker-php-ext-install mysqli | |
WORKDIR /usr/src/myapp | |
# 0.0.0.0 is important: this way the server will response with any request from the outside |
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
const cols = [{ ts: 1 }, { ts: 5 }, { ts: 6 }] | |
const smallest = 1 | |
const interpolatedCols = cols.reduce((accumulated, current) => { | |
const prev = accumulated[accumulated.length - 1] | |
for (let i = prev.ts + smallest; i <= current.ts; i += smallest) { | |
const element = { ts: i } | |
accumulated.push(element) | |
} | |
return accumulated | |
}, [cols[0]]) |
OlderNewer