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
// Call this script with a http URL as the single argument: | |
// node test_request.js http://www.google.com | |
var http = require('http'); | |
var url = require('url'); | |
parsed = url.parse(process.argv[2]); | |
var opts = { | |
port: 80, |
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> | |
{# <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> #} | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> | |
<!--[if IE 9 ]> <html class="no-js ie9" lang="en"> <![endif]--> | |
<!--[if !(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<style>/* This works just as well in a stylesheet, of course */ |
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
// | |
// Typical Prototype composure in JS; This is the classical way of creating and | |
// using objects in JS. | |
// | |
// "Super" or "Parent" object prototype | |
function Cat(color) { | |
this.color = color; | |
this.saying = 'meowwww'; | |
} |
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> | |
<meta charset="utf-8"> | |
<title>Sane Modal</title> | |
<meta name="viewport" content="width=device-width"> | |
</head><body> | |
<!-- All "normal" content goes in the base layer --> | |
<div id="base-layer"> |
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> | |
<meta charset="utf-8"> | |
<title>Sane Modal</title> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="positioned.css"> | |
</head><body> | |
<div id="base-layer"> |
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
Backbone.Events.one = function (events, callback, context) { | |
var self = this; | |
function wrapper() { | |
self.off(events, wrapper, context); | |
callback.apply(this, arguments); | |
} | |
this.on(events, wrapper, context); | |
}; |
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> | |
// Conditionally load Google Analytics | |
if (!PAGE.inDevmode) { | |
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | |
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g,s)}(document,'script')); | |
} |
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
<head> | |
<script> | |
(function() { | |
var d = document, | |
w = window, | |
de = d.documentElement, | |
os = w.applicationCache && w.JSON && w.localStorage, | |
om = window.operamini, | |
pe = 'pointerEvents' in de.style && !window.opera, // Opera gives false positive | |
bs = 'backgroundSize' in de.style && !om; // Opera Mini gives false positive |
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
[default] Configuring and enabling network interfaces... | |
[default] Mounting shared folders... | |
[default] -- /webapp | |
[default] -- /vagrant | |
[default] Forcing shutdown of VM... | |
[default] Destroying VM and associated drives... | |
/Applications/Vagrant/embedded/gems/gems/vagrant-1.1.1/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:16:in `call': uninitialized constant VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings::Errors (NameError) |
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
<?php | |
// If there were *no* submission errors: | |
if ($err === 0) { | |
if (function_exists('htmlspecialchars_decode')) { | |
$subject = htmlspecialchars_decode($subject); | |
$message = htmlspecialchars_decode($message); | |
} | |
$message .= "\r\nPhoneNumber: " . $phone; |