Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
Inspired By: grafana/loki#333
version: "3"
networks:
loki:
| <?php | |
| if (file_exists('sig1.php')) { | |
| unlink('sig1.php'); | |
| } | |
| function getc($url) | |
| { | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
| function logColor(color, args) { | |
| console.log(`%c ${args.join(' ')}`, `color: ${color}`); | |
| } | |
| const log = { | |
| aliceblue: (...args) => { logColor('aliceblue', args)}, | |
| antiquewhite: (...args) => { logColor('antiquewhite', args)}, | |
| aqua: (...args) => { logColor('aqua', args)}, | |
| aquamarine: (...args) => { logColor('aquamarine', args)}, | |
| azure: (...args) => { logColor('azure', args)}, |
| <?php | |
| namespace AppBundle\Entity; | |
| /** | |
| * @package AppBundle\Entity | |
| * @ORM\Entity() | |
| * @ORM\Table() | |
| * @ORM\Cache(usage="NONSTRICT_READ_WRITE") | |
| */ |
| 'use strict' | |
| const app = require('express')(), | |
| request = require('request'), | |
| mongo = require('mongodb'), | |
| bodyParser = require('body-parser') | |
| app.use(bodyParser.json()) | |
| app.use(bodyParser.urlencoded({ | |
| extended: false |
| <link rel="preload" href="css/global.min.css" as="style" onload="this.rel='stylesheet'"> | |
| <noscript><link rel="stylesheet" href="css/global.min.css"></noscript> | |
| <script> | |
| /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ | |
| !function(a){"use strict";var b=function(b,c,d){function j(a){if(e.body)return a();setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this); | |
| /*! loadCSS rel=preload po |
| <?php | |
| require_once dirname(__FILE__) . '/../lib/simpletest/autorun.php'; | |
| // Retries $f (A function) with arguments ($args as array) | |
| // 3 ($retries) times after 10 secs $delay | |
| // Usage: | |
| // retry( 'function_name', array('arg1', 'arg2'), 15, 5 ); | |
| // #=> Retries function_name 5 times with arg1 and $arg2 as arguments at interval of 15 secs | |
| function retry($f, $args = null, $delay = 10, $retries = 3) | |
| { |
| /* | |
| https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/ | |
| You can copy paste this code in your console on smashingmagazine.com | |
| in order to have cross-fade transition when change page. | |
| */ | |
| var cache = {}; | |
| function loadPage(url) { | |
| if (cache[url]) { |
| (function (delay, type) { | |
| const g = (c) => document.getElementsByClassName(c); | |
| const pics = g('_si7dy'); | |
| function iteration() { | |
| const heart = g((type === 'like') ? 'coreSpriteHeartOpen' : 'coreSpriteHeartFull')[0]; | |
| heart && heart.click(); | |
| g('coreSpriteRightPaginationArrow')[0].click(); | |
| } |
| <?php | |
| $app->register(new Silex\Provider\TranslationServiceProvider(), [ | |
| 'locale_fallbacks' => ['en', 'uk', 'ru'], | |
| ]); | |
| $app->before(function() use ($app) { | |
| $locales = $app['translator']->getFallbackLocales(); | |
| $prefLocales = array_reduce(explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']), function ($res, $el) { list($l, $q) = array_merge(explode(';q=', $el), [1]); $res[$l] = (float) $q; return $res; }, []); | |
| asort($prefLocales); |