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
| ; Start a new pool named 'www'. | |
| ; the variable $pool can we used in any directive and will be replaced by the | |
| ; pool name ('www' here) | |
| [num8er] | |
| ; Per pool prefix | |
| ; It only applies on the following directives: | |
| ; - 'slowlog' | |
| ; - 'listen' (unum8ersocket) | |
| ; - 'chroot' |
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 | |
| namespace Polyfills | |
| { | |
| final class Ereg | |
| { | |
| public static function ereg($pattern, $string, &$regs = null) | |
| { | |
| if ($pattern === '' || $pattern === null) { | |
| trigger_error('ereg(): REG_EMPTY', E_USER_WARNING); |
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
| [$USER] | |
| user = $USER | |
| group = $USER | |
| listen = /run/php/fpm-$USER.sock | |
| listen.owner = $USER | |
| listen.group = $USER | |
| listen.mode = 0666 | |
| pm = dynamic |
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
| from flask import request | |
| from flask.logging import default_handler | |
| class RequestFormatter(logging.Formatter): | |
| def format(self, record): | |
| record.url = request.url | |
| record.remote_addr = request.remote_addr | |
| if 'X-Forwarded-For' in request.headers: | |
| proxy_data = request.headers['X-Forwarded-For'] | |
| ip_list = proxy_data.split(',') |
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
| const crypto = require('crypto'); | |
| class Crypter { | |
| constructor (secretKey, secretKeySalt) { | |
| this._keychain = { | |
| key: this.createKey(secretKey, secretKeySalt), | |
| iv: this.createIV(secretKey, secretKeySalt) | |
| }; | |
| } |
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
| const net = require("net"); | |
| const server = net.createServer(); | |
| server.on("connection", (clientToProxySocket) => { | |
| //console.log("Client connected to proxy"); | |
| clientToProxySocket.once("data", (data) => { | |
| let isTLSConnection = data.toString().indexOf("CONNECT") !== -1; | |
| let serverPort = 8008; | |
| let serverAddress = '127.0.0.1'; |
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
| package main | |
| import "core:fmt" | |
| import "core:net" | |
| import "core:io" | |
| import "core:thread" | |
| import "core:time" | |
| import "core:strings" | |
| Client :: struct { |
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
| # Given alphanumeric string that includes two special characters + and -. | |
| # Dash "-" means range, "+" (plus) means inclusion of number to list. | |
| # Please execute RangeFormulaToList.sql to create function before running test below. | |
| # Examples: | |
| DROP TABLE IF EXISTS `tests_formulas`; | |
| CREATE TABLE `tests_formulas` ( | |
| `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
| `formula` text DEFAULT 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
| using System; | |
| class Program | |
| { | |
| static async Task Main(string[] args) | |
| { | |
| var webSocketEventEmitter = new WebSocketEventEmitter(); | |
| webSocketEventEmitter.MessageReceived += (sender, message) => | |
| { | |
| Console.WriteLine("Received message: " + message); |
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
| #include <iostream> | |
| struct Product { | |
| Product(const std::string& name): name(name) { | |
| std::cout << "Named Product constructor for \"" + name + "\"" << std::endl; | |
| } | |
| Product(): name("") { | |
| std::cout << "Draft Product constructor" << std::endl; | |
| } | |
| ~Product() { |