Skip to content

Instantly share code, notes, and snippets.

Avatar

Sean Murphy sgmurphy

View GitHub Profile
@sgmurphy
sgmurphy / router.js
Last active Jan 3, 2019
Ember error pages
View router.js
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function() {
// app routes
View keybase.md

Keybase proof

I hereby claim:

  • I am sgmurphy on github.
  • I am sgmurphy (https://keybase.io/sgmurphy) on keybase.
  • I have a public key whose fingerprint is 4948 DD81 CF99 3510 DFF0 44A6 A6D8 401E D683 98F5

To claim this, I am signing this object:

@sgmurphy
sgmurphy / url_slug.php
Created Jul 12, 2012
URL Slugs in PHP (with UTF-8 and Transliteration Support)
View url_slug.php
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
@sgmurphy
sgmurphy / mb_str_replace.php
Created Jul 12, 2012
mb_str_replace for PHP
View mb_str_replace.php
<?php
/**
* Replace all occurrences of the search string with the replacement string.
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
* @license http://creativecommons.org/publicdomain/zero/1.0/
* @link http://php.net/manual/function.str-replace.php
*
* @param mixed $search
@sgmurphy
sgmurphy / url_slug.js
Created Jul 12, 2012
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
View url_slug.js
/**
* Create a web friendly URL slug from a string.
*
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
@sgmurphy
sgmurphy / podcast-ratings.php
Created Feb 21, 2012
Scrape ratings from iTunes store
View podcast-ratings.php
<?php
/**
* Scrape the number of podcast reviews from iTunes for all country specific storefronts.
*
* @author Sean Murphy <sean@iamseanmurphy.com>
*/
$podcast_id = '366931951'; // Startups For the Rest of Us
//$podcast_id = '318567721'; // techzing
You can’t perform that action at this time.