This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
// Person object | |
type Person struct { | |
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek. |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
// Person object | |
type Person struct { | |
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek. |
This file contains 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
acl CONNECT method CONNECT | |
# line 919: add (define ACL for internal) | |
acl lan src 10.0.0.0/24 | |
http_access allow localhost | |
# line 1058: add (set ACL for internal) | |
http_access allow lan | |
http_access allow all | |
http_port 3120 | |
via off | |
forwarded_for delete |
This file contains 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 | |
// file : /smartyplugins/function.run.php | |
function smarty_function_run($params, $template) | |
{ | |
//var_dump($params); | |
if ($params['method'] == '') { | |
trigger_error("url: run Komutunda method parametresi boş olamaz."); | |
return; | |
} |
This file contains 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/bash | |
mkdir /opt/php-5.3.29 | |
mkdir /usr/local/src/php5-build | |
cd /usr/local/src/php5-build | |
wget http://de.php.net/get/php-5.3.29.tar.bz2/from/this/mirror -O php-5.3.29.tar.bz2 | |
tar jxf php-5.3.29.tar.bz2 | |
# Thanks https://crybit.com/20-common-php-compilation-errors-and-fix-unix/ | |
apt-get install libbz2-dev libxml2-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libc-client2007e-dev libkrb5-dev libmcrypt-dev libpq-dev libmysqlclient-dev | |
mkdir /usr/include/freetype2/freetype |
This file contains 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/bash | |
# Test On Mac OS X | |
# | |
#enter input encoding here | |
FROM_ENCODING="ISO-8859-9" | |
#output encoding(UTF-8) | |
TO_ENCODING="UTF-8//TRANSLIT" | |
#convert | |
#iconv -f ISO-8859-9 -t UTF-8//TRANSLIT index.php -o index.php.utf8 | |
CONVERT="iconv -f $FROM_ENCODING -t $TO_ENCODING" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
// Hit objemiz | |
type Hit struct { | |
count int |
This file contains 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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
// Hit objemiz | |
type Hit struct { | |
count int |
This file contains 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
func GetirOnu(key string,cache Cache) (string,error]){ | |
value, err := cache.Get(key) | |
if err != nil { | |
fmt.Println("Hata Oluştu : ", err) | |
return "",error | |
} | |
return string(value),nil | |
} |
This file contains 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
/* | |
GetirOnu fonksiyonu gördüğünüz gibi ilk parametre olarak cache key alıyor | |
fakat ikinci parametre MemoryCache olmalı. | |
Redis yada memcache'e uyarlamak istediğinizde projedeki tüm MemoryCache yazan satırları değişmeniz gerekir | |
GetirOnu fonksiyonunu sadece MemoryCache ile çalışıyor. | |
*/ | |
func GetirOnu(key string,cache *MemoryCache) (string,error]){ | |
value, err := cache.Get(key) | |
if err != nil { | |
fmt.Println("Hata Oluştu : ", err) |