Skip to content

Instantly share code, notes, and snippets.

View pawel-dubiel's full-sized avatar
😄

Paweł Dubiel pawel-dubiel

😄
View GitHub Profile
@pawel-dubiel
pawel-dubiel / gist:3713813
Created September 13, 2012 11:48
#Iphone check the Private browsing is enabled
try {
localStorage.setItem('test', 'test');
} catch (err) {
if ((err.name).toUpperCase() == 'QUOTA_EXCEEDED_ERR') {
document.write('<div style="padding:5%;margin:5%;background:#777;color:white;height:90%">We don\'t seem to be able to store the information needed for this app to work on your phone.<br /><br /> It\'s probably because you have enabled private browsing mode. If you\'d like to disable private browsing go to settings section on your phone.</div>');
}
}
@pawel-dubiel
pawel-dubiel / gist:3707633
Created September 12, 2012 15:54
GitHub automatic deployment #github
try
{
$payload = json_decode($_REQUEST['payload']);
}
catch(Exception $e)
{
exit(0);
}
file_put_contents('logs/github.txt', print_r($payload, TRUE), FILE_APPEND);