SELECT
users.name AS staff,
facilities.name AS facility
FROM
users
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
#!/usr/bin/env python | |
import gzip | |
import os | |
import sys | |
import re | |
INPUT_DIR = "nginx-logs" | |
lineformat = re.compile(r"""(?P<ipaddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?P<dateandtime>\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\] ((\"(GET|POST) )(?P<url>.+)(http\/1\.1")) (?P<statuscode>\d{3}) (?P<bytessent>\d+) (["](?P<refferer>(\-)|(.+))["]) (["](?P<useragent>.+)["])""", re.IGNORECASE) |
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 telefone_validation(telefone) { | |
//retira todos os caracteres menos os numeros | |
telefone = telefone.replace(/\D/g, ''); | |
//verifica se tem a qtde de numero correto | |
if (!(telefone.length >= 10 && telefone.length <= 11)) return false; | |
//Se tiver 11 caracteres, verificar se começa com 9 o celular | |
if (telefone.length == 11 && parseInt(telefone.substring(2, 3)) != 9) return false; |
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
//https://analytics.tiktok.com/i18n/pixel/events.js?sdkid=C5O44L5Q5ECR7VU4C09G&lib=ttq | |
//https://analytics.tiktok.com/i18n/pixel/identify.js | |
//https://analytics.tiktok.com/i18n/pixel/config.js?sdkid=C5O44L5Q5ECR7VU4C09G&hostname=wnonline.com.br | |
window[window["TiktokAnalyticsObject"]]._env = { | |
"env": "external" | |
}; | |
window[window["TiktokAnalyticsObject"]]._variation_id = 'test'; | |
! function(e) { | |
var i = {}; |
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 | |
// php cluter-quick-check --host <host> --port <port> [--auth password] | |
function panicAbort($str_msg) { | |
fprintf(STDERR, "Error: $str_msg\n"); | |
exit(-1); | |
} | |
function panicClusterSlotsError($arr_slots, $str_context) { | |
$str_slots = print_r($arr_slots, true); |
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
When setting these options consider the following:
- How long is your average request?
- What is the maximum number of simultaneous visitors the site(s) get?
- How much memory on average does each child process consume?
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
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 e = new Array; | |
e.AF = "Afghanistan", | |
e.AL = "Albania", | |
e.DZ = "Algeria", | |
e.AS = "American Samoa", | |
e.AD = "Andorra", | |
e.AO = "Angola", | |
e.AI = "Anguilla", | |
e.AQ = "Antarctica", | |
e.AG = "Antigua And Barbuda", |
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 | |
$webhook = fopen('php://input', 'rb'); | |
$webhook_content = ""; | |
while (!feof($webhook)) { | |
$webhook_content .= fread($webhook, 4096); | |
} | |
fclose($webhook); | |
$webhook_data = json_decode($webhook_content, true); | |
$signature = $webhook_data["signature"]; |
Assuming PHP is compiled with debug enabled.
$ gdb /usr/sbin/php-fpm
Then:
r --nodaemonize --fpm-config /etc/php7/fpm/php-fpm.conf