This file contains hidden or 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
// Begin Debug Output | |
echo "Debug Output for VARIABLENAME:<br><pre>"; | |
var_dump($VARIABLENAME); | |
echo "</pre><br>End of debug output."; | |
// End Debug Output |
This file contains hidden or 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> | |
<head> | |
<style type="text/css"> | |
html | |
{ | |
/* Set background image so that transparency is easy to see */ | |
background: #fff url(http://uhaweb.hartford.edu/CASS/unicorn.jpg) fixed no-repeat; | |
} | |
#container |
This file contains hidden or 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> | |
<head> | |
<!-- Conditional statement because older versions of IE do not support rgba --> | |
<!--[if IE]> | |
<style type="text/css"> | |
#container | |
{ | |
background:transparent; | |
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70); |
This file contains hidden or 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> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> |
This file contains hidden or 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
<?php | |
$CallFrom = $_REQUEST['From']; // Take the phone number that is calling this app | |
$CallFrom = substr($CallFrom, 2); // Take the country code (+1, for example) off the front of the number | |
$CallFrom = chunk_split($CallFrom,1,","); // Insert a comma between each digit | |
echo $CallFrom; | |
?> |
This file contains hidden or 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
# This is for instances where a single Rails app serves multiple domains. | |
# That is, http://domainA.com and http://domainB.com are both served by the same Rails app. | |
# When launching these manually, I specify which site I want to see by passing a site variable: | |
# site=domainB ruby script/server | |
# This gist allows site switching via a rake task: | |
# rake pow[SITENAME] | |
# If no '[SITENAME]' is provided, then it defaults to the 'domainA' site | |
desc "Switches site that Pow serves" | |
task :pow, :site_name do |t, args| |
This file contains hidden or 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
def set_site | |
if RAILS_ENV == "development" | |
session[:site] = ENV['site'] || "domainA" # Default to domainA in development | |
else session[:site].blank? | |
if RAILS_ENV == "staging" | |
session[:site] = case request.subdomains.last # *.yourstagingdomain.com | |
when "domainA" then "domainA" | |
when "domainB" then "domainB" | |
end | |
elsif RAILS_ENV == "production" |
This file contains hidden or 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
def set_site | |
if RAILS_ENV == "development" | |
session[:site] = case request.domain | |
when "domainA.dev" then "domainA" | |
when "domainB.dev" then "domainB" | |
else ENV['site'] || "domainA" | |
end | |
else session[:site].blank? | |
if RAILS_ENV == "staging" | |
session[:site] = case request.subdomains.last # *.yourstagingdomain.com |
This file contains hidden or 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
# unstaged (*) and staged (+) changes will be shown next to the branch name | |
GIT_PS1_SHOWDIRTYSTATE="." | |
# if there are untracked files (%) will be shown next to the branch name | |
GIT_PS1_SHOWUNTRACKEDFILES="." | |
# if something is stashed ($) will be shown next to the branch name | |
GIT_PS1_SHOWSTASHSTATE="." | |
# you are behind (<), you are ahead (>), or you have diverged (<>) | |
GIT_PS1_SHOWUPSTREAM="auto" | |
# White brackets, yellow path, blue branch name, and cyan dollar sign |
This file contains hidden or 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
tail -f log/development.log | grep 'Rendered\|Completed' |
OlderNewer