Skip to content

Instantly share code, notes, and snippets.

View lahaxearnaud's full-sized avatar
🎯
Focusing

LAHAXE Arnaud lahaxearnaud

🎯
Focusing
View GitHub Profile
const LazyLoad = require('vanilla-lazyload');
let lazyLoad = new LazyLoad();
liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/public"
# en écrivant ici on garde le cache entre chaque release
cache_prefix: "images/cache"
loaders:
default:
/**
* @Route("/cocktail/recette/{name}-{id}", name="cocktail_detail", requirements={"id"="\d+", "name"="[0-9a-z-]+"})
* @Cache(public=true, maxage=86400, mustRevalidate=false, maxStale=86400)
**/
public function index($name, $id)
{
// ...
}
{{ render_esi(url('popular_cocktails')) }}
framework:
esi: { enabled: true }
fragments: { path: /_fragment }
vcl 4.0;
import std;
backend default {
// le hostname du nginx dans ma stack
.host = "front";
.port = "80";
}
0 * * * * node webPageTest.js
const WebPageTest = require('webpagetest');
const http = require('http');
const SDC = require('statsd-client'),
sdc = new SDC({
prefix: '<NOM_DU_SITE_OU_DE_LA_PAGE>.webpagetest',
host: '<VOTRE_HOST_GRAPHITE>',
port: 8125
});
const wpt = new WebPageTest('www.webpagetest.org', '<VOTRE_API_KEY>');
npm install statsd-client webpagetest --save
Compiling...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Compiling /etc/shorewall/zones...
Compiling /etc/shorewall/interfaces...
Determining Hosts in Zones...
Locating Action Files...
Compiling /usr/share/shorewall/action.Drop for chain Drop...
Compiling /usr/share/shorewall/action.Broadcast for chain Broadcast...
Compiling /usr/share/shorewall/action.Invalid for chain Invalid...