Skip to content

Instantly share code, notes, and snippets.

Shaw shshaw

Block or report user

Report or block shshaw

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
shshaw / JSfixForResponsiveSVGsInSafari.js
Created Jan 14, 2016 — forked from benfrain/JSfixForResponsiveSVGsInSafari.js
A vanilla JavaScript fix (of sorts) for responsive SVGs in Safari and some other WebKit browsers.
View JSfixForResponsiveSVGsInSafari.js
Title: Vanilla JavaScript to fix responsive SVGs in some versions of Safari.
What it does: Stops the problem I described here: Reference URL of the issue:
It will work on all SVGs referenced inside objects as long as given the class .emb:
<object class="emb" data="img/cup.svg" type="image/svg+xml"></object>
And also any inline SVGs.
shshaw /
Last active Aug 29, 2015 — forked from liamcurry/
HTML5 Video format conversion with FFmpeg
# Output file for HTML5 video
# Requirements: ffmpeg .6+ with libvorbis, theora and libvpx
# ( Install via brew with `brew install ffmpeg --with-libvorbis --with-libvpx --with-theora` )
# Usage: `./ infile.mp4`
# Optional parameters:
# `./ infile.mp4 -y` to force overwriting existing videos
# `./ infile.mp4 -n 640x480` to force an output size
shshaw / functions.php
Last active Aug 22, 2016 — forked from fardog/functions.php
Fixes a `Creating default object from empty value` on [line 61](
View functions.php
function north_cast_api_data($content) {
if (is_numeric($content)) $content = intval($content);
else {
$unserialized_content = @unserialize($content);
// we got serialized content
if ($unserialized_content !== false) {
// make sure that integers are represented as such, instead of str
foreach ($unserialized_content as $fn => &$c) {
You can’t perform that action at this time.