Skip to content

Instantly share code, notes, and snippets.


terry chay tychay

View GitHub Profile
tychay / 1_install_ansible_20_from_source
Last active September 30, 2016 14:39
Ansible 2.0 with Digital Ocean v2
View 1_install_ansible_20_from_source
$ git clone git:// --recursive
$ cd ansible
$ source ./hacking/env-setup
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
$ make
$ sudo make install
tychay / config.js
Last active March 1, 2017 19:05 — forked from pywebdesign/config.js
Restangular adapter to expand compound documents from
View config.js
// This variation just injects the extracted data right into the relationships and also stores things in
// ._meta and ._included instead of just .included
// it (like restangular) requires either lodash or underscorejs
.config(function(RestangularProvider) {
// add a response interceptor
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
var extractedData =;
tychay / patch_picturefill_to_ignore_feeds.php
Created April 24, 2015 02:58
Attempted patch to so that picturefill doesn't mess with rss feeds.
View patch_picturefill_to_ignore_feeds.php
function apply_picturefill_to_content_not_feed($html, $cache = null) {
if ( is_feed() ) { return $html; }
return Picturefill_WP::get_instance()->picturefill_wp_apply_to_html($html, $cache);
remove_filter( 'the_content', array( Picturefill_WP::get_instance(), 'picturefill_wp_apply_to_html' ), apply_filters('picturefill_wp_the_content_filter_priority', 11) );
add_filter ( 'the_content, 'apply_picturefill_to_content_not_feed', apply_filters('picturefill_wp_the_content_filter_priority', 11) );
tychay / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console