Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

View GitHub Profile
# bu ornek serdaraytekin den alintilanmistir
# kaynak: http://www.serdaraytekin.com/docs/os/debian/sarge-install-6.html
# 9/7/10: turkiye yansilari guncellendi.
deb http://ftp.metu.edu.tr/debian testing main contrib non-free
deb-src http://ftp.metu.edu.tr/debian testing main contrib non-free
deb http://ftp.tr.debian.org/debian-security testing/updates main contrib non-free
# deb http://debian.comu.edu.tr/debian testing main contrib non-free
[fcgi-program:php-cgi]
command=/usr/bin/php-cgi
socket=tcp://127.0.0.1:9000
process_name=%(program_name)s_%(process_num)02d
user=www-data
numprocs=8
priority=999
autostart=true
#autorestart=unexpected
autorestart=true
server {
listen 80;
server_name localhost;
index index.php index.html index.htm;
root /var/www;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
[fcgi-program:php-cgi]
command=/usr/bin/php-cgi
socket=tcp://127.0.0.1:9000
process_name=%(program_name)s_%(process_num)02d
user=www-data
numprocs=8
priority=999
autostart=true
#autorestart=unexpected
autorestart=true
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
index index.php index.html index.htm;
root /var/www;
location / {
<?php
$var = 1;
$pointer = &$var;
$pointer = 99;
echo "var = $var"; // var = 1 DEGIL var = 99 olur!
?>
<?php
function is_valid ($tc) {
/* $tc, string secildi. Iki sebebi var:
1. Integer turunu ust siniri 10 haneli
echo PHP_INT_MAX; --> 2147483647
2. Double kullanilabilirdi, bu sefer de tamsayi - gercel
biraz daha karmasIk olacakti.
*/
$message = "";
<h1>Tablo Ornekleri</h1>
<h3>Ornek 1</h3>
<TABLE border="1"
<TR><TH rowspan="2">Foo<TH colspan="2">Average
<TH rowspan="2">Red<BR>eyes
<TR><TH>height<TH>weight
<TR><TH>Males<TD>1.9<TD>0.003<TD>40%
<TR><TH>Females<TD>1.7<TD>0.002<TD>43%
</TABLE>
#!/bin/sh
PROGNAME=${0##*/}
# Yeni bir mysql db'si oluşturur.
whisper () {
local name description value
name="$1"
@seyyah
seyyah / db.php
Created September 25, 2010 09:35
<?php
require_once("inc/common.php");
require_once("inc/format_base.php");
require_once("inc/format_gift.php");
$question = new qformat_gift();
$question
->id : number
->name : string