Skip to content

Instantly share code, notes, and snippets.

Josh Buchea joshbuchea

Block or report user

Report or block joshbuchea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View favicons.html
<link rel="icon" type="image/png" sizes="192x192" href="/favicons/android-chrome-192x192.png">
<link rel="manifest" href="/manifest.json">
<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">
joshbuchea /
Created Sep 20, 2016 — forked from zcorpan/
#HTMLQuiz what happens (iframe escape)

#HTMLQuiz what happens?

<iframe id=x></iframe>
  • wild DOMException appears
  • iframe escapes
joshbuchea /
Created Sep 8, 2016 — forked from willurd/
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
View Google Maps Simple Multiple Marker Example
<title>Google Maps Multiple Markers</title>
<script src="" type="text/javascript"></script>
<div id="map" style="height: 400px; width: 500px;">
<script type="text/javascript">
joshbuchea / gist:e769eb87b6f462af8d71fcebc30c7061
Created May 19, 2016 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
View gist:e769eb87b6f462af8d71fcebc30c7061

Share Counts

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.


joshbuchea /
Created Apr 15, 2016 — forked from kevinSuttle/
List of Usable HTML Meta and Link Tags

Copied from

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
joshbuchea / cross-browser-input-field.css
Created Feb 19, 2016
CSS for consistent cross-browser input field rendering
View cross-browser-input-field.css
.input {
padding: 0 6px; /* no vertical padding */
height: 32px; /* required */
line-height: 24px;
joshbuchea / publickey-git-error.markdown
Created Feb 17, 2016 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git
View publickey-git-error.markdown

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and 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 in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "". Th
joshbuchea / decodeUrlParameter.js
Last active Feb 19, 2016 — forked from bchapuis/decodeUrlParameter.js
Replace the plus sign which encode spaces in GET parameters using javascript.
View decodeUrlParameter.js
function decodeUrlParameter(str) {
return decodeURIComponent((str+'').replace(/\+/g, '%20'));
View fixed-header-anchor-link-fix.css
You can’t perform that action at this time.