Skip to content

Instantly share code, notes, and snippets.

View austinjreilly's full-sized avatar

Austin J. Reilly austinjreilly

View GitHub Profile
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing
@funzeye
funzeye / WordPress Advanced Custom Field - Responsive Image Field
Last active November 26, 2015 21:53
How To Use Responsive Images in WordPress using Advanced Custom Field's image field and the wp-tevko-responsive-images Plugin
<figure>
<?php
$image = get_field('your_image_field_name');
$atts = array(
'imageid' => $image,
'size1' => '0',
'size2' =>'600',
'size3' =>'1000'
);
echo tevkori_responsive_shortcode($atts) ; ?>
@adamnorwood
adamnorwood / Gruntfile.js
Last active August 29, 2015 14:01
Gruntfile for Pattern Lab + Compass + LiveReload
/*
Gruntfile for Pattern Lab + Compass + LiveReload
This is a sample Gruntfile for integrating Pattern Lab's template
regeneration with Compass and LiveReload.
I've found that using the Chrome LiveReload extension is slow as it
forces a full-page browser reload instead of using CSS injection. This
Gruntfile setup seems to work great, though, if you use the LiveReload
JS snippet instead. Just add this script right before the closing
@bollwyvl
bollwyvl / README.md
Last active February 24, 2023 21:47
RevealJS TimelineJS

Basic use case

  • make a timeline (video)
    • save it someplace reveal.js can find it (maybe next to your presentation, or on Google Docs)
  • in reveal.js/index.html
  • add reveal-timeline.js as a dependency
@adamnorwood
adamnorwood / Gruntfile.js
Last active October 3, 2018 16:01
Gruntfile for Pattern Lab + Compass + Live Reload via grunt-browser-sync
/*
Gruntfile for Pattern Lab + Compass + Live Reload via grunt-browser-sync
Set up to use browser-sync because for the life of me I can't get
the grunt-contrib-watch livereload to *inject* the compiled CSS changes
to the browser (as opposed to livereload doing a full page refresh)...
(To be clear, the CSS injection I'm talking about is where changes to
the CSS file are slipped in to the browser very quickly with no
full page reload, and without losing your place if you've scrolled
@joyrexus
joyrexus / README.md
Created March 28, 2014 16:59
Nested grouping of arrays

nest.js

A multi-level groupBy for arrays inspired by D3's nest operator.

Nesting allows elements in an array to be grouped into a hierarchical tree structure; think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. The levels in the tree are specified by key functions.

See this fiddle for live demo.

@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@nathanielks
nathanielks / get_template.php
Last active February 22, 2022 08:49
A set of functions for finding and getting a template and being able to pass parameters to it via an array. Borrowed from https://github.com/woothemes/woocommerce/blob/e3cc5931bad28b24233fb9d14c61c096cbd4b122/includes/wc-core-functions.php#L91
<?php
/**
* Get other templates (e.g. product attributes) passing attributes and including the file.
*
* @access public
* @param mixed $template_name
* @param array $args (default: array())
* @param string $template_path (default: '')
* @param string $default_path (default: '')
* @return void */
@ryansechrest
ryansechrest / .htaccess
Last active September 30, 2022 19:53
Sample configuration files for WordPress as Git submodule.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Prevent requests to index.php from being rewritten
RewriteRule ^index\.php$ - [L]
# Prefix specified PHP files with 'wordpress'
RewriteRule ^((wp-login|xmlrpc)\.php) wordpress/$1 [R=301,L]
@debasishg
debasishg / gist:8172796
Last active April 20, 2025 12:45
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t