Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View alexfraundorf-com's full-sized avatar

Alex Fraundorf alexfraundorf-com

View GitHub Profile
@alexfraundorf-com
alexfraundorf-com / tls_test.php
Created December 20, 2018 18:10 — forked from olivierbellone/tls_test.php
Simple TLS version test for PHP, using howsmyssl.com
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n";
@alexfraundorf-com
alexfraundorf-com / stop-video.js
Created May 21, 2017 00:32 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@alexfraundorf-com
alexfraundorf-com / stop-video.js
Created May 21, 2017 00:32 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@alexfraundorf-com
alexfraundorf-com / us-state-names-abbrevs.php
Created January 26, 2016 15:54 — forked from maxrice/us-state-names-abbrevs.php
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',