Skip to content

Instantly share code, notes, and snippets.

View piyushs02's full-sized avatar
😊
On Work

Piyush Srivastava piyushs02

😊
On Work
  • Stanza Living
  • New Delhi, Delhi, India
View GitHub Profile
@piyushs02
piyushs02 / tor_curl.php
Created February 1, 2017 11:17 — forked from zachflower/tor_curl.php
How To Anonymize PHP cURL Requests Using Tor
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
@piyushs02
piyushs02 / magento-nginx.conf
Created July 25, 2017 18:39 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {