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 namespace PopularPost; | |
class WordpressPopularPostsExtracted | |
{ | |
/** | |
* Instance of this class. | |
* | |
* @since 3.0.0 | |
* @var object | |
*/ |
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
let master = () => { | |
return new Promise( (resolve, reject) => { | |
setTimeout(() => { resolve('ok'); }, 3000); | |
}); | |
} | |
let slaves = [ | |
{ | |
start: () => { | |
console.log("loading") |
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 | |
namespace App\Services\CloudFlare; | |
use GuzzleHttp\Client; | |
class CloudFlareClient | |
{ | |
private $email; | |
private $key; |
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
function resolvePromise(promise, iterator) { | |
promise.then( | |
(response) => { | |
let result = iterator.next(response); | |
if (!result.done) { | |
sync(result.value, iterator); | |
} | |
}, | |
error => { | |
let result = iterator.next(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
var crazyArray = [[1,2,[3]],4]; | |
function flatten(crazyArray, items = []) { | |
var item; | |
while(crazyArray.length != 0){ | |
item = crazyArray.pop(); | |
if(Array.isArray(item)) { | |
flatten(item, items); | |
} else { | |
items.push(item); |
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
import {sync} from "./sync"; | |
import {handleError} from "./catchError"; | |
export function raceOnTime(generator, timeOut) { | |
return (new Promise((resolve, reject) => { | |
let _resolve; | |
const timer = setTimeout(() => { | |
reject({error: new Error('timeout')}); | |
}, timeOut); |
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
server { | |
server_name folan.info www.folan.info; | |
return 301 https://www.folan.info$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name www.folan.info; |
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
# if using cloudeflare you should activate "full" ssl not "flexible" at all | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name folan.xyz; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; |
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
server { | |
listen 443 ssl; | |
listen 80; | |
server_name filan.com www.filan.com; | |
root /var/www/samsung/public; | |
index index.php index.html index.htm; | |
if ($http_cf_visitor ~ '{"scheme":"http"}') { | |
return 301 https://$server_name$request_uri; | |
} |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
daemon off; | |
load_module modules/ngx_http_dav_ext_module.so; | |
events { | |
worker_connections 2048; | |
multi_accept on; |
OlderNewer