This file contains hidden or 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 | |
| /*ismin nikneymin sonuna gereken eki ekler */ | |
| function isimeki($ad, $ektipi= "in") | |
| { | |
| $sertsessizler = array("ç", "f", "h", "k", "p","s", "ş", "t"); | |
| /// türkçe sesli ve sert sessiz karakterler | |
| $buyuk = array("A", "I", "E", "İ", "U","O", "Ü", "Ö", "Ç", "F", "H", "K", "P","S", "Ş", "T"); | |
| $kucuk = array("a", "ı", "e", "i", "u","o", "ü", "ö", "ç", "f", "h", "k", "p","s", "ş", "t"); |
This file contains hidden or 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
| CREATE TABLE `isimler` ( | |
| `id` int(10) NOT NULL AUTO_INCREMENT, | |
| `ad` varchar(255) COLLATE utf8_bin NOT NULL, | |
| `cinsiyet` varchar(50) COLLATE utf8_bin NOT NULL, | |
| PRIMARY KEY (`id`), | |
| UNIQUE KEY `ad` (`ad`), | |
| KEY `cinsiyet` (`cinsiyet`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; | |
This file contains hidden or 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 | |
| hosts_config(){ | |
| hosts_file=/private/etc/hosts | |
| echo "\n127.0.0.1 $1\n">>$hosts_file | |
| echo "Hosts file was updated." | |
| } | |
| apache_config(){ | |
| site_name=$1 |
This file contains hidden or 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
| function resize(oran){ | |
| var newH = parseFloat( $(window).height() ); | |
| var newW = parseFloat( $(window).width() ); | |
| var rat = newW / newH; | |
| if(rat > oran) | |
| { | |
| var targetHeight = newH; | |
| var targetWidth = newH * oran; | |
| } |
This file contains hidden or 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
| function credit_card_type($ccNum) | |
| { | |
| if (ereg("^5[1-5][0-9]{14}$", $ccNum)) | |
| return "Mastercard"; | |
| if (ereg("^4[0-9]{12}([0-9]{3})?$", $ccNum)) | |
| return "Visa"; | |
| if (ereg("^3[47][0-9]{13}$", $ccNum)) | |
| return "American Express"; |
This file contains hidden or 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
| $(document).ready(function(){ | |
| $("input[placeholder], textarea[placeholder]").each(function(i, e){ | |
| if($(e).val() == "") | |
| { | |
| $(e).val($(e).attr("placeholder")); | |
| } | |
| $(e).blur(function(){ | |
| if($(this).val()=="") | |
| $(this).val($(e).attr("placeholder")); | |
| }).focus(function(){ |
This file contains hidden or 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
| Options +FollowSymLinks | |
| Options +Indexes | |
| RewriteEngine On | |
| # Eğer sitenize doğrudan www.siteniz.com domaini ile girilirse: | |
| RewriteCond %{HTTP_HOST} www.siteniz.com$ [NC] | |
| RewriteCond %{SCRIPT_FILENAME} !-d | |
| RewriteCond %{SCRIPT_FILENAME} !-f | |
| RewriteRule ^(.*)$ index.php/$1 [L] | |
This file contains hidden or 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
| Save this as ~/.inputrc: | |
| # make the up and down arrows cycle through commands that match the start of a line | |
| "\e[A": history-search-backward | |
| "\e[B": history-search-forward | |
| Option-up would be \e\e[A and control-p \C-p. You can see the escape sequences of other key combinations by pressing control-v. |
This file contains hidden or 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
| yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel | |
| cd /usr/local/src | |
| wget http://git-core.googlecode.com/files/git-1.7.9.tar.gz | |
| tar xvzf git-1.7.9.tar.gz | |
| cd git-1.7.9 | |
| ./configure | |
| make | |
| make install |
NewerOlder