Skip to content

Instantly share code, notes, and snippets.


Akos Aladics aakos

  • Crowdfunder
  • Newquay, UK
View GitHub Profile
aakos / detect_ajax
Created Feb 4, 2013
PHP ajax detection snippet
View detect_ajax
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
// If it's ajax do your stuff
echo 'This is coming via ajax!';
//if not an ajax do other stuff
echo 'This is coming from PHP!';
aakos / inline-block-whitespace-off
Created Nov 25, 2012
negate white space on inline-block elements
View inline-block-whitespace-off
* Taken from:
.nav {
letter-spacing: -0.25em; /*webkit*/
*letter-spacing: normal; /*IE hack*/
word-spacing: -0.43em;