Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Erhan BURHAN eburhan

💭
I may be slow to respond.
  • T.C. İçişleri Bakanlığı
  • Ankara
  • @eburhan
View GitHub Profile
@eburhan
eburhan / phpserver.bat
Created Apr 2, 2020
start a PHP Web Server from context menu
View phpserver.bat
@echo off
SET "Host=localhost"
SET "Port=88"
SET /p "Port=Port numarasi gir ya da [ENTER] ile %Port% nolu portu otomatik sec: "
START http://%Host%:%Port%
php -S %Host%:%Port% -t "%1"
@eburhan
eburhan / nginx-socketio-ssl-reverse-proxy.conf
Created Feb 14, 2020 — forked from gmanau/nginx-socketio-ssl-reverse-proxy.conf
How to setup nginx as nodejs/socket.io reverse proxy over SSL
View nginx-socketio-ssl-reverse-proxy.conf
upstream upstream-apache2 {
server 127.0.0.1:8080;
}
upstream upstream-nodejs {
server 127.0.0.1:3000;
}
server {
listen 80;
@eburhan
eburhan / server.blacklist
Created Feb 19, 2018 — forked from peterjaap/server.blacklist
Bad bot blacklist nginx config file (used on Hypernodes for Magento - place in /data/web/nginx/server.blacklist)
View server.blacklist
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|DISCo|discobot|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearch|ExpertSearchSpider|Express\ WebPictures|extract|ExtractorPro|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|genieo|Genieo|GetRight|GetWeb\!|GigablastOpenSource|Go\-Ahead\-Got\-It|Go\!Zilla|GozaikBot|grab|GrabNet|Grafula|GrapeshotCrawler|GT\:\:WWW|GTB5|Guzz
@eburhan
eburhan / innobackupex-restore.sh
Created Mar 1, 2016 — forked from dalecaru/innobackupex-restore.sh
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
View innobackupex-restore.sh
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@eburhan
eburhan / Calendar.php
Created Jan 4, 2016
Herhangi bir yılın Herhangi bir ayının günlerini, haftalara bölünmüş halde takvim olarak geri döndürür.
View Calendar.php
<?php
/**
* Herhangi bir yılın herhangi bir ayına ait günlerini,
* haftalara bölünmüş halde takvim olarak geri döndürür.
* 2016 Erhan BURHAN
*/
class Calendar {
/**
* takvimi oluşturur
@eburhan
eburhan / tcno_dogrula.js
Last active Jan 2, 2021
javascript ile TC Kimlik Numarası doğrulama (1 döngü kullanılarak)
View tcno_dogrula.js
/* tc kimlik numarasının geçerli olup olmadığını kontrol eder
* 2015 Erhan BURHAN
*--------------------------------------------------------------------*/
function tcno_dogrula(tcno)
{
// geleni her zaman String'e çevirelim!
tcno = String(tcno);
// tcno '0' karakteri ile başlayamaz!
if (tcno.substring(0, 1) === '0') {