Skip to content

Instantly share code, notes, and snippets.

View szepeviktor's full-sized avatar
🍓
Doing byte-level care

Viktor Szépe szepeviktor

🍓
Doing byte-level care
View GitHub Profile
@szepeviktor
szepeviktor / google-serp-character-size.js
Last active August 29, 2015 13:57
Google SERP title, url and description size by Javascript
/**
* Measure Google's SERP character width
*
* one result is 512px wide on a Windows desktop
*
* STEPS to get Google SERP's source
*
* disable Javascript in your browser
* search in Google (from the front page)
* copy the URL
@szepeviktor
szepeviktor / incrontab
Created March 24, 2014 16:22
Auto reload NGINX by incron (inotify cron)
/var/www/site1/nginx.conf IN_MODIFY,IN_NO_LOOP /usr/local/sbin/nginx-reload.sh
/var/www/site2/nginx.conf IN_MODIFY,IN_NO_LOOP /usr/local/sbin/nginx-reload.sh
/var/www/site3/nginx.conf IN_MODIFY,IN_NO_LOOP /usr/local/sbin/nginx-reload.sh
<?php
function on_shutdown(){
global $php_errormsg;
echo "<!--\n";
echo "\n\tHeaders Sent:";
$file = $line = null;
headers_sent($file, $line);
echo "\n\t\t$file: $line";
echo "\n\tLast Error:";
@szepeviktor
szepeviktor / wpadmin_tuning.php
Last active August 29, 2015 13:57
WordPress dashboard -> hide descriptions
MOVED to: https://github.com/szepeviktor/wordpress-plugin-construction
@szepeviktor
szepeviktor / apc-delete-dir.php
Last active August 29, 2015 13:58
Delete whole directory from APC opcode cache
MOVED to: https://github.com/szepeviktor/wplib/blob/master/share/wplib/opcache-del-dir.php
@szepeviktor
szepeviktor / debackport-manual.sh
Last active August 29, 2015 14:00
Backport Debian packages from Jessie (testing)
MOVED to: https://github.com/szepeviktor/debian-server-tools
@szepeviktor
szepeviktor / logsearch.sh
Last active August 29, 2015 14:00
Search Apache logs by selecting fields and more
MOVED to: https://github.com/szepeviktor/debian-server-tools
@szepeviktor
szepeviktor / pipe.sh
Last active August 29, 2015 14:00
Send (pipe) files through a TCP socket AES256 encrypted - a bash script
MOVED to: https://github.com/szepeviktor/debian-server-tools
@szepeviktor
szepeviktor / deb-pack.sh
Last active August 29, 2015 14:00
Extract and Rebuild Debain packages the right way
MOVED to: https://github.com/szepeviktor/debian-server-tools/blob/master/package/debackport.sh
@szepeviktor
szepeviktor / build-suhosin-1fba865.sh
Last active August 29, 2015 14:00
Build Suhosin with PHP 5.4
MOVED to: https://github.com/szepeviktor/debian-server-tools