This file contains hidden or 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 | |
$url = 'https://httpbin.org/anything?'; | |
function proxyDoHeader($curl, $headerLine) | |
{ | |
$trimmed = trim($headerLine); | |
if (strlen($trimmed) > 0 && !preg_match('/^(Date|Server|Transfer)/', $trimmed)) { | |
header($trimmed); | |
} |
This file contains hidden or 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 declare(strict_types=1); | |
$inputPath = __DIR__ . '/script.php'; | |
$outputPath = __DIR__ . '/script.min.php'; | |
$markerStart = "/* API SCRIPT FUNCTIONS START */\n"; | |
$markerEnd = "/* API SCRIPT FUNCTIONS END */\n"; | |
$lines = file($inputPath); | |
$f = fopen($outputPath, 'w'); | |
$buffer = null; |
This file contains hidden or 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
// input | |
const secret = 'top secret' | |
const userData = {'version_id': 1, 'user_id': 123, 'username': 'xxx'} | |
// prepare | |
const password = crypto.createHash('md5').update(secret).digest() | |
const json = JSON.stringify(userData) | |
const cipher = 'aes-128-cbc' | |
const ivLength = 16 |
This file contains hidden or 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
#!/bin/sh | |
docker run --rm -it --network=bkvn_default --entrypoint=curator_cli olalonde/curator \ | |
--host elasticsearch \ | |
delete_indices \ | |
--filter_list '[{"filtertype":"age","source":"creation_date","direction":"older","unit":"days","unit_count":7},{"filtertype":"pattern","kind":"prefix","value":"logstash"}]' |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="google-site-verification" content="ht9lmeQSHFSNMyrd1PcB-qqzkNuw5M5lN_L6eYEfWIU"> | |
<meta name="description" content="Đây là phần mềm tự động tăng view theo từ khóa và link đã định trước. Yêu mến CSM hãy chạy link này thường xuyên"> | |
<meta name="keywords" content="cuoc song moi,cong ty cuoc song moi,ky nang mem,danh thuc tiem nang,huan luyen tam ly dac biet,lieu kim thuy,dao tao ky nang,huan luyen ky nang,ky nang ban hang,ky nang giao tiep, "> |
This file contains hidden or 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
initGet: function() { | |
var hash = document.location.hash; | |
if (hash == '#_=_' || hash.indexOf('#.') > -1) { | |
hash = ''; | |
} | |
if (hash.length > 2) { | |
var pfTime = uix.time(); | |
var $target = $(hash); | |
if ($target.length) { | |
uix.fixScrollLocation.topOffset = $target.offset().top; |
This file contains hidden or 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 static function fire($event, array $args = array(), $hint = null) | |
{ | |
(strpos($event, 'template') === false && (strpos($event, 'load_class') === false || $event === 'load_class') && setHeaderTimer($hint ? $hint : $event)); | |
... | |
} |
This file contains hidden or 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 | |
$config['db']['host'] = 'mysql'; | |
$config['db']['port'] = '3306'; | |
$config['db']['username'] = 'root'; | |
$config['db']['password'] = 'root'; | |
$config['db']['dbname'] = 'xenforo'; | |
if (preg_match('/^xenforo-(?<dbname>[a-z]+)\./', $_SERVER['SERVER_NAME'], $serverNameMatches)) { | |
$config['db']['dbname'] = $serverNameMatches['dbname']; |