This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://stackoverflow.com/questions/1265040/how-to-count-total-lines-changed-by-a-specific-author-in-a-git-repository | |
git log --author="_Your_Name_Here_" --pretty=tformat: --numstat \ | |
| awk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function NotInFacebookFrame() { | |
return top === self; | |
} | |
function ReferrerIsFacebookApp() { | |
if(document.referrer) { | |
return document.referrer.indexOf("facebook.com") != -1; | |
} | |
return false; | |
} | |
if (NotInFacebookFrame()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Salted | A Responsive Email Template</title> | |
<!-- | |
SALTED | A RESPONSIVE EMAIL TEMPLATE | |
===================================== | |
Based on code used and tested by Litmus (@litmusapp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update repo | |
sudo apt-get update | |
# upgrade and install latest updates | |
sudo apt-get upgrade | |
# generate UTF-8 lang | |
sudo locale-gen UTF-8 | |
# install lamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My Form Validation Class | |
# Save this in 'core' folder under 'application' folder | |
class MY_form_validation extends CI_form_validation { | |
function valid_url($str){ | |
if(filter_var($str, FILTER_VALIDATE_URL)) { | |
return TRUE; | |
} else { | |
return FALSE; | |
} |