Skip to content

Instantly share code, notes, and snippets.

@faridjame
faridjame / php-display-errors
Last active October 1, 2015 13:47
PHP: Turn error reporting on
//Display ALL errors
error_reporting(E_ALL);
ini_set("display_errors", 1);
//only fatal and warnings
error_reporting(E_ALL ^ E_NOTICE);
//or use this: http://www.codeblog.ch/2012/07/improved-php-error-reporting/
@faridjame
faridjame / gist:2006729
Created March 9, 2012 14:23
CSS: Rounded Box
.round {
-webkit-border-radius: 12px;
border-radius: 12px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
@faridjame
faridjame / gist:2006753
Created March 9, 2012 14:33
CSS: Opacity
.opacity {
opacity: 0.9;
filter: alpha(opacity=90);
}
@faridjame
faridjame / gist:2006763
Created March 9, 2012 14:37
HTML: Table Structure
<table summary="text">
<caption>Text</caption>
<thead>
<tr>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<td></td>
@faridjame
faridjame / gist:3744706
Created September 18, 2012 18:04
PHP: send multi attachment emails with swiftmailer
<?php
require_once('swift/lib/swift_required.php');
$email = $_POST['email'];
$subject = "my subject";
$user_message = "<b>message body</b>";
$mailer = new Swift_Mailer(new Swift_MailTransport());
$message = Swift_Message::newInstance();
$message->setSubject($subject);
@faridjame
faridjame / chrome-cross-browser
Last active December 16, 2015 22:09
Open Chrome for cross browser Ajax functionality
C:\Users\[Your Name]\AppData\Local\Google\Chrome\Application>chrome.exe -disable-web-security --allow-file-access-from-files