#HTMLQuiz what happens?
<iframe id=x></iframe>
<script>
x.contentDocument.body.appendChild(x);
</script>
- wild DOMException appears
- iframe escapes
<link rel="icon" type="image/png" sizes="192x192" href="/favicons/android-chrome-192x192.png"> | |
{{^includesManifest}} | |
<link rel="manifest" href="/manifest.json"> | |
{{/includesManifest}} | |
<meta name="mobile-web-app-capable" content="yes"> | |
<meta name="theme-color" content="#ffffff"> | |
<meta name="application-name" content="AMP by Example"> | |
<link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png"> | |
<link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/favicons/apple-touch-icon-72x72.png"> |
#HTMLQuiz what happens?
<iframe id=x></iframe>
<script>
x.contentDocument.body.appendChild(x);
</script>
- wild DOMException appears
- iframe escapes
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<html> | |
<head> | |
<title>Google Maps Multiple Markers</title> | |
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="map" style="height: 400px; width: 500px;"> | |
</div> | |
<script type="text/javascript"> |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
.input { | |
padding: 0 6px; /* no vertical padding */ | |
height: 32px; /* required */ | |
line-height: 24px; | |
} |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
*nix
based command prompt (but not the default Windows Command Prompt!)cd ~/.ssh
. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\
on Windows).ssh
folder, there should be these two files: id_rsa
and id_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa
and id_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default.ssh-keygen -t rsa -C "[email protected]"
. Thfunction decodeUrlParameter(str) { | |
return decodeURIComponent((str+'').replace(/\+/g, '%20')); | |
} |
:target:before { | |
content:""; | |
display:block; | |
height:60px; /* fixed header height*/ | |
margin:-60px 0 0; /* negative fixed header height */ | |
} |