Skip to content

Instantly share code, notes, and snippets.

Barlas Apaydin barlas

Block or report user

Report or block barlas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
barlas / ready-tr-lower-upper-func.js
Last active Feb 5, 2019
javascript - Turkish character lowercase and uppercase functions.
View ready-tr-lower-upper-func.js
String.prototype.turkishToLower = function(){
var string = this;
var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" };
string = string.replace(/(([İIŞĞÜÇÖ]))/g, function(letter){ return letters[letter]; })
return string.toLowerCase();
String.prototype.turkishToUpper = function(){
var string = this;
var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" };
View git-fork-logic.txt
git reset --hard
git branch
git checkout -b [branch-name]
git checkout [branch-name]
git branch -D [branch-name]
// setup
- fork repo
View python-fast-webserver.txt
$ cd related-dir
$ python -m SimpleHTTPServer 8080
barlas / php.ini
Created Sep 9, 2015
phar enabled
View php.ini
detect_unicode = Off
; About php.ini ;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
View httpd.conf
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:> for detailed information.
# In particular, see
# <URL:>
# for a discussion of each configuration directive.
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
View username.conf
<Directory "/Users/username/Sites/">
Options Indexes MultiViews
AllowOverride All
Options +FollowSymLinks
Require all granted
Allow from all
View httpd-userdir.conf
# Settings for user home directories
# Required module: mod_authz_core, mod_authz_host, mod_userdir
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
UserDir Sites
barlas /
Last active Aug 29, 2015 — forked from offsky/
Setup new mac for web development (Updated for Yosemite)
barlas / ready
Created Apr 24, 2015
jQuery - Close tooltip with a click apart from tooltip wrapper.
View ready
$(document).click(function(e) {
if( !$('.tooltip-wrapper').length ) {
if( $('.tooltip').hasClass('active') ) {
barlas / ready-detection-var.js
Last active Aug 29, 2015
javascript - Browser and Device detection variables.
View ready-detection-var.js
var isChrome = navigator.userAgent.indexOf('Chrome') > -1,
isFireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1,
isSafari = navigator.userAgent.indexOf('Safari') > -1,
isIE = navigator.appName.indexOf('Internet Explorer')!=-1,
isIE7 = navigator.appVersion.indexOf("MSIE 7.") != -1,
isIE8 = navigator.appVersion.indexOf("MSIE 8.") != -1;
if ((isChrome)&&(isSafari)) {isSafari=false;}
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? isTabletMobile = true : isTabletMobile = false;
/iPad/i.test(navigator.userAgent) ? isTablet = true : isTablet = false;
You can’t perform that action at this time.