Skip to content

Instantly share code, notes, and snippets.


Matthew Stokeley matthewstokeley

Block or report user

Report or block matthewstokeley

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
matthewstokeley / gist:356b3816a4ee46695ed8
Created Jul 18, 2014
parse google calendar xml feed incomplete
View gist:356b3816a4ee46695ed8
/** Parsing google calendar xml feed **/
class GoogleCal {
protected $feed_url;
protected $data;
View gist:97b4ce86af46343012c5
npm install grunt --save-dev && npm install time-grunt --save && npm install load-grunt-config --save-dev && npm install grunt-concurrent --save-dev && npm install grunt-contrib-clean --save-dev && npm install grunt-contrib-imagemin --save-dev && npm install grunt-contrib-uglify --save-dev && npm install grunt-contrib-csslint --save-dev && npm install grunt-contrib-jshint --save-dev
View gist:13d4bcc3c12b8edc1856
.full-width-image {
/* height 0 padding-bottom hack */
height: 0;
/* contain stretches to largest */
background-size: contain;
background-repeat: no-repeat;
.bg {
/* percentage relative to image ratio */
matthewstokeley / gist:2ea7f266a2313702579a
Created May 30, 2015
compare strings regardless of case
View gist:2ea7f266a2313702579a
// as a function
var isLike = function(set) {
if ((set[0].localeCompare(set[1], 'en', {sensitivity: 'base'})) !== 0) {
return false;
return true;
var is = isLike(['a', 'A']);
matthewstokeley / gist:36b088f008e9c3ab4c36
Last active Aug 29, 2015
execute a function by string name in a namespace without eval
View gist:36b088f008e9c3ab4c36
var namespace = {};
var x = 'fn';
namespace.fn = function() {
// execute function by string name
var execute = function(context, name, args) {
View gist:42abc92a1863c0d4bbfc
$('a[href="javascript:;"]').bind('click', function(e) {
var target;
target = $(this).data('section');
$('#' + target).velocity('scroll', {
duration: 500,
offset: -40,
easing: 'ease-out'
View hookable_markup.html
<!-- references: -->
<!-- accessibility -->
<!-- semantics -->
<!-- idiomatic markup -->
<!-- modular components -->
<!-- css class selector performance -->
<!-- js id selector performance -->
<!-- object-oriented-like css classes -->
<!-- good example -->
less /var/log/mysql/error.log
free -m
tail -f /var/log/apache2/error.log
ping -c 3 $SERVERIP > /dev/null 2>&1
View _headers.scss
// This gist creates maintainable, DRY, responsive header classes and selectors that allow for unqualified property attribution, semantic markup without class-stacking, and minimal compiled css by using a loop to create heading selectors and placeholders from a simple data structure.
// To implement, adjust the sizes in the map. Heading selectors will be compiled. Placeholders that reference the heading size can be extended in any element.
// There are issues using placeholders inside media-queries. These are being addressed.
// See the references at the top of the gist for more information.
View gist:a9ad8fe4228aed4e9a2ffc5cedc025f2
# working with text in bash
# paste string into a text file
echo string > textfile
# export stdout to a text file
command > textfile
# copy contents of a text file
cat filename > /dev/clipboard
You can’t perform that action at this time.