Skip to content

Instantly share code, notes, and snippets.

View nevergone's full-sized avatar

Kurucz István nevergone

View GitHub Profile
@nevergone
nevergone / gist:4271273
Created December 12, 2012 20:26
dátum-felismeréshez reguláris kifejezés
(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])
@nevergone
nevergone / gist:3065812
Created July 7, 2012 10:41
PHP APC konfiguráció
extension = apc.so
apc.shm_segments = 1
apc.shm_size = 256
apc.optimization = 0
apc.num_files_hint = 2048
apc.ttl = 3600
apc.user_ttl = 3600
apc.enable_cli = 1
apc.max_file_size = 1M
apc.rfc1867 = 1
location /foo/bar {
auth_basic "Auth name";
auth_basic_user_file /etc/phpmyadmin/htpasswd;
try_files $uri/ $uri/index.php;
}
location ~ ^/foo/bar(.+\.php)$ {
alias /usr/share/phpmyadmin$1;
fastcgi_pass unix:/var/run/php5-fpm/www-data.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$1;
@nevergone
nevergone / gist:958608
Created May 6, 2011 08:25
Linux promt-om
export GIT_PS1_SHOWDIRTYSTATE=true
# colored prompt
USER=`whoami`
if [ $LOGNAME = $USER ] ; then
USERCOLOR=32 # green
else
USERCOLOR=33 # yellow
fi
if [ $USER = 'root' ] ; then
USERCOLOR=31 # red