Skip to content

Instantly share code, notes, and snippets.

@shameerc
shameerc / validate_email.php
Created December 10, 2010 05:47
Simple email valiation
<?php
// This function uses simple filter_var function
// instead of regular expression to validate email
// @param string email Email address to be validated
function validateEmail($email) {
return filter_var($email, FILTER_VALIDATE_EMAIL);
}
?>
@yaranaio
yaranaio / gist:2049302
Created March 16, 2012 09:39
twitter bootstrap alert helper
<?php
if (!function_exists('alert')) {
function alert($message) {
$buffer = null;
if ( !empty($message) ) {
$buffer .= '<div class="alert ';
if ( array_key_exists('alert-error', $message) ) {
$buffer .= 'alert-error">';
if ( is_array($message['alert-error']) ) {
$buffer .= '<ul>';
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 20, 2025 23:00
A badass list of frontend development resources I collected over time.
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples