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
###################################################################### | |
# Recolor Prompt and show current GIT Branch | |
###################################################################### | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function reviseprompt { | |
local BLACK="\[\033[0;30m\]" | |
local BLACK_BOLD="\[\033[1;30m\]" |
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
$time_start = microtime(true); | |
// MySQL Query Here... | |
$time_end = microtime(true); | |
$time = $time_end - $time_start; | |
echo "execution time: ".$time." s"; |
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
<!-- Station URLs --> | |
http://www.azfamily.com | |
http://www.kens5.com | |
http://www.kgw.com | |
http://www.khou.com | |
http://www.king5.com | |
http://www.kmov.com | |
http://www.krem.com | |
http://www.ktvb.com |
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
foreach($_POST as $key => $value) { | |
$$key = $value; | |
// $$key = addslashes(trim($value)); // Sanitized Version | |
} | |
// Source: http://www.daniweb.com/web-development/php/threads/148513/assigning-dynamic-post-variables |
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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.js"></script> | |
<script type="text/javascript"> |
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
// URL Parameters | |
function getUrlVars(){ | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} |
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
<div id="ios"> | |
<a href="itms://itunes.apple.com/us/app/ktvb/id401142659?mt=8">iTunes Link Here</a> | |
</div> | |
<div id="android"> | |
<a href="market://details?id=com.doapps.android.mln.MLN_dcef0f44a0df1e66efd449f37cf9fe01">Android Link Here1</a> | |
<a href="market://details?id=com.doapps.android.mln.MLN_18f5510dffbc3d27e96d0e8c148d8b76">Android Link Here2</a> | |
</div> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<script type="text/javascript"> |
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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Jquery Add/Remove Elements</title> | |
<style> | |
*{margin: 0; padding: 0;} | |
html {background: #CCC; font-family:Helvetica,Arial,sans-serif;} | |
body {width: 1024px; margin: 50px auto;} | |
h1 {float: left;} |
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
<style type="text/css"> | |
body { | |
color: red; /* all browsers, of course */ | |
color : green\9; /* IE8 and below */ | |
*color : yellow; /* IE7 and below */ | |
_color : orange; /* IE6 */ | |
} | |
</style> |
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
<script> | |
var ua = navigator.userAgent; | |
var checker = { | |
ios: ua.match(/(iPhone|iPod|iPad)/), | |
blackberry: ua.match(/BlackBerry/), | |
android: ua.match(/Android/), | |
windowsphone: ua.match(/Windows Phone/) | |
}; | |
$(document).ready(function() { |
NewerOlder