Skip to content

Instantly share code, notes, and snippets.

View joshfrench's full-sized avatar
🙃

Josh French joshfrench

🙃
View GitHub Profile
{
"$ref": "#/definitions/VpcCni",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"Affinity": {
"type": [
"object",
"null"
]
},

Keybase proof

I hereby claim:

  • I am joshfrench on github.
  • I am joshfrench (https://keybase.io/joshfrench) on keybase.
  • I have a public key whose fingerprint is 2F13 921B FEC5 6871 DDB3 9AE6 693C 52B8 6E9F 04C1

To claim this, I am signing this object:

Starting with a fresh checkout of imgix.js and the following versions:

  • Node v5.4.0
  • NPM 3.8.3
$ npm i
> precommit-hook@2.0.1 install /Users/josh/src/imgix.js/node_modules/precommit-hook
> node bin/install
(ns om-tutorial.core
(:require [goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]))
(enable-console-print!)
(def init-data
{:dashboard/items
[{:id 0
Date::toRelativeTime = ->
delta = new Date() - this
intervals =
millisecond: 1
second: 1000
minute: 60
hour: 60
day: 24
month: 30
year: 12
@joshfrench
joshfrench / coffeescript.md
Created June 10, 2011 15:16
NY Ruby Meetup/CoffeeScript notes

Hey folks,

We covered a lot of ground yesterday and I wanted to write up some notes on a few points that helped me get up the CoffeeScript learning curve.

List comprehensions

I spend most of my time in Ruby and ObjC and this is one of those language features I truly envy.

Let's say we have some DOM elements that need to be sortable via drag-and-drop. It'll work like the re-orderable queue on Netflix (if you still get DVDs mailed to you like a chump.)

/ Very basic file attachment via a page part. When rendered, this part will
/ output the path to its attached document.
/ Provide a view partial for the page-edit form:
.row= file_field_tag "page[parts_attributes][#{page_part_counter}][document]"
- if page_part.document.file?
.row= page_part.document.original_filename
Author.find :all, :joins => 'inner join extensions on extensions.author_id = authors.id', :group => 'authors.id'
# Had to add the :group key to produce a unique set.
# Removing `:include => :extensions` also reduced this from two queries to one.
@joshfrench
joshfrench / push-to-integrity-post-receive
Created July 15, 2009 18:25 — forked from Pistos/push-to-integrity-post-receive
Integrity post-receive hook, safe for git 1.5.x and won't yak on merge commits
#!/usr/bin/env ruby19
require 'net/http'
require 'uri'
require 'json'
# EDIT POST_RECEIVE_URL
POST_RECEIVE_URL = 'http://hostname:8910/repository-name/push'
old_head, new_head, ref = STDIN.gets.split