Skip to content

Instantly share code, notes, and snippets.

View jasonhodges's full-sized avatar

Jason Hodges jasonhodges

  • out in the country
View GitHub Profile
@jasonhodges
jasonhodges / Google maps geocode.txt
Last active September 2, 2015 19:03 — forked from boldfacedesign/Google maps geocode.txt
Google maps geocode multiple addresses and add info windows
var locations = [
['Bondi Beach', '850 Bay st 04 Toronto, Ont'],
['Coogee Beach', '932 Bay Street, Toronto, ON M5S 1B1'],
['Cronulla Beach', '61 Town Centre Court, Toronto, ON M1P'],
['Manly Beach', '832 Bay Street, Toronto, ON M5S 1B1'],
['Maroubra Beach', '606 New Toronto Street, Toronto, ON M8V 2E8']
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 10,
@jasonhodges
jasonhodges / gulpfile.js
Last active September 10, 2015 13:56 — forked from swashcap/gulpfile.js
Gulpifying Jekyll
/* global -$ */
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var browserSync = require('browser-sync');
var reload = browserSync.reload;
gulp.task('styles', function () {
return gulp.src('app/css/main.scss')
@jasonhodges
jasonhodges / .bash_profile
Created October 19, 2015 16:23 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jasonhodges
jasonhodges / sifttter.rb
Created January 15, 2016 12:11 — forked from craigeley/sifttter.rb
This script looks for text files in a specific folder that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter
#!/usr/bin/ruby
# SIFTTTER 1.5: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
# Multiple Date Function by Paul Hayes 2014 <http://paulrhayes.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 67, and the location of your Day One in line 66
# * Scans leading timestamps in each line matching the selected dates
# * Does not alter text files in any way
@jasonhodges
jasonhodges / solarized-dark.css
Created February 12, 2016 15:48 — forked from nicolashery/solarized-dark.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@jasonhodges
jasonhodges / README.md
Created January 10, 2017 04:35 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@jasonhodges
jasonhodges / keys.pipe.ts
Created April 19, 2017 11:30
custom Angular 2+ pipe to transform an object of objects into any array
import { Pipe, PipeTransform } from '@angular/core';
/**
* usage: *ngFor="let item of data | key"
*/
@Pipe({
name: 'keys'
})
export class KeysPipe implements PipeTransform {
/**
* @param value - object of objects
@jasonhodges
jasonhodges / deepcopy.ts
Created April 19, 2017 13:27
demo TypeScript deepcopy function
// https://egghead.io/lessons/typescript-deep-copy-aka-clone-objects-using-typescript
function deepcopy<T>(o: T): T {
return JSON.parse(JSON.stringify(o));
}
const foo = {
x: {
y: {
z: 123
}
@jasonhodges
jasonhodges / .block
Last active June 2, 2017 20:56
d3v4 sankey
license: mit
@jasonhodges
jasonhodges / .block
Last active June 16, 2017 01:17
Sankey Diagram
license: mit