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
using System.IO; | |
using OpenQA.Selenium.Chrome; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var options = new ChromeOptions(); |
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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y php7.2 php7.2-fpm php7.2-xml php-dev php-pear libmcrypt-dev | |
sudo pecl install mcrypt-snapshot | |
# add mcrypt.so to php cli and fpm | |
sudo bash -c "echo 'extension=mcrypt.so' >> /etc/php/7.2/cli/php.ini" | |
sudo bash -c "echo 'extension=mcrypt.so' >> /etc/php/7.2/fpm/php.ini" | |
# change nginx site-availables to use php7.2-fpm |
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
# ec2 t2.micro can get over 20k connections by adding this line to nginx.conf | |
# test on ubuntu 16.04 | |
# modify /etc/nginx/nginx.conf | |
worker_connections 10240; | |
# restart nginx | |
sudo systemctl reload nginx | |
# tool for testing |
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
ubuntu 16.04 | |
sudo apt-get install php-xdebug | |
/etc/php/7.1/fpm/php.ini | |
[xdebug] | |
xdebug.remote_enable=on | |
xdebug.remote_handler=dbgp | |
xdebug.remote_host=localhost | |
xdebug.remote_port=9000 |
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 | |
// The code is inspired by the following discussions and post: | |
// http://stackoverflow.com/questions/5483851/manually-parse-raw-http-data-with-php/5488449#5488449 | |
// http://www.chlab.ch/blog/archives/webdevelopment/manually-parse-raw-http-data-php | |
/** | |
* Parse raw HTTP request data | |
* | |
* Pass in $a_data as an array. This is done by reference to avoid copying |
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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |