Skip to content

Instantly share code, notes, and snippets.


Josh Buchea joshbuchea

View GitHub Profile
joshbuchea / select-50-states.html
Last active Aug 29, 2015
Select menu of all 50 United States and Minor Outlying Territories.
View select-50-states.html
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
joshbuchea / select-countries.html
Last active Aug 29, 2015
A fairly comprehensive select menu of all the countries around the world.
View select-countries.html
<option value=" " selected>(please select a country)</option>
<option value="--">none</option>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
View jsonp.php
// Note: The user-provided callback name must be filtered to prevent attack
// vectors. This script simply removes any symbols other than `[a-zA-Z0-9$_]`
// from the input. Sadly, this blocks the use of some valid JavaScript
// identifiers, and also accepts a few invalid ones. See
// for details.
$callback = isset($_GET['callback'])
? preg_replace('/[^a-zA-Z0-9$_.]/s', '', $_GET['callback'])
: false;
joshbuchea / cordova-detect-ios7.js
Last active Aug 29, 2015
Cordova/PhoneGap - Detect iOS 7
View cordova-detect-ios7.js
var ios7 = (device.platform == 'iOS' && parseInt(device.version) >= 7);
if (ios7) {
// iOS 7
joshbuchea / cordova-inline-video.html
Last active Oct 13, 2016
Cordova - Play Video Inline in iOS (Set AllowInlineMediaPlayback to true in config.xml)
View cordova-inline-video.html
<video id="vidTitle" webkit-playsinline>
<source src="videos/video.mp4" type="video/mp4">
joshbuchea / select-1-100.html
Last active Sep 6, 2019
A select box with options 1–100
View select-1-100.html
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
View devices.json
"Device Name":"Acer Iconia Tab A1-810",
"OS Version":"4.2.2",
"Portrait Width":"768",
"Landscape Width":"1024",
"Release Date":"2013-05"
joshbuchea / angular-filter-trusted.js
Last active Aug 29, 2015
AngularJS Trusted Resource Filter
View angular-filter-trusted.js
.filter('trusted', ['$sce', function ($sce) {
return function(url) {
return $sce.trustAsResourceUrl(url);
joshbuchea / ionic-splitview-fix.css
Created Jan 3, 2015
Hides side menu button while side menu is open
View ionic-splitview-fix.css
/* hide menu-toggle button while side menu is open */
.aside-open [menu-toggle] {
display: none !important;
joshbuchea / ionic-splitview-iphone6plus.html
Last active Aug 29, 2015
Ionic Split View Controller - iPhone 6 Plus & Larger
View ionic-splitview-iphone6plus.html
<ion-side-menu expose-aside-when="(min-width:736px)">