A colorized version of my recreation of an untitled GIF by PATAKK.
View main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
View brush.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!d3.chart) d3.chart = {}; | |
d3.chart.brush = function() { | |
var g; | |
var data; | |
var width = 600; | |
var height = 30; | |
var dispatch = d3.dispatch(chart, "filter"); | |
function chart(container) { |
View app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('App').config(function (RestangularProvider) { | |
// convert json request to x-www-form-urlencoded request | |
RestangularProvider.setFullRequestInterceptor(function (el, op, what, url) { | |
if (op === "put" || op === "post") { | |
var res = ""; | |
_.forOwn(el, function (v, k) { | |
if (!_.isFunction(v)) { | |
res += k + "=" + encodeURIComponent(v) + "&"; |
View gist:8432502
Step 0:
Get Homebrew installed on your mac if you don't already have it
Step 1:
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)