Skip to content

Instantly share code, notes, and snippets.

He is trying to focus :)

Emre Saracoglu emresaracoglu

He is trying to focus :)
View GitHub Profile
kshitiz621 / whois.php
Created Mar 19, 2019
PHP code to get WHOIS information of a domain
View whois.php
php easy :: whois lookup script
Author: php easy code,
Web Site:
$domain = $_GET['domain'];
ve3 / Encryption.js
Last active Sep 1, 2021
Encrypt and decrypt between programming languages (PHP & JavaScript).
View Encryption.js
* Encryption class for encrypt/decrypt that works between programming languages.
* @author Vee Winch.
* @link Reference.
* @link crypto-js.js can be download from here.
class Encryption {
View easy_encrypt_decrypt_strings_with_javascript_with_unicode_support.js
String.prototype.normalise_to_ascii = function(){return unescape(encodeURIComponent(this)); }
String.prototype.normalise_to_unicode = function(){return decodeURIComponent(escape(this)); }
String.prototype.crypt_symmetric = function(key){
var me = this + ""; //unlink reference
key = Number(String(Number(key))) === key ? Number(key) : 13; //optionaly provide key for symmetric-like-""encryption"".
me = me.split('') //to array of characters.
.map(function(c){return c.charCodeAt(0);}) //to array of numbers (each is character's ASCII value)
luckyshot / geoip.php
Last active Nov 13, 2020
PHP - Geolocalization by IP address
View geoip.php
define('GEOIP_CACHE_TIME', 5184000); // 5184000 = 60 days
* Returns the country of an IP address
* If IP is cached and less than 2 months old, otherwhise requests it to API
* @string $ip The IP address
* @bool $justcountry If you want the full array or just the country
chales / db-connect-test.php
Last active Oct 11, 2021
Script for a quick PHP MySQL DB connection test.
View db-connect-test.php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
denji /
Last active Oct 20, 2021
NGINX tuning for best performance

Moved to git repository:

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

m4tthumphrey / CronSchedule.php
Last active Aug 20, 2021
CronSchedule.php - Allows one to parse a cron expression into human readable text.
View CronSchedule.php
* Plugin: StreamlineFoundation
* Class: Schedule
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.
servergrove /
Created Jan 24, 2012
Script to backup MySQL
# Configuration.
date=`date +%Y-%m-%d`
dbpass=`cat /etc/.mysqlpasswd`