Skip to content

Instantly share code, notes, and snippets.

View jpcody's full-sized avatar

Joshua Cody jpcody

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jpcody on github.
  • I am jpcody (https://keybase.io/jpcody) on keybase.
  • I have a public key whose fingerprint is 7584 AFB7 C58B C13A 0CFD D0DE 2362 01FB 66F2 E5C4

To claim this, I am signing this object:

About the Position

We're looking to add a front-end engineer to build brand new products at AcademicWorks and help shepherd our current products as they mature.

This engineer will work closely with our lead user experience engineer (👋 from behind the 4th wall) to continue improving our experience for users, solidifying our codebase, and laying the foundation for new features and products.

Our front-end tooling mainly consists of:

Here's the gist of the step-wise refactoring done during the talk. Included below are some specific links that were insightful to me as I dug in to this.

Modern Resources

@jpcody
jpcody / 1_original.rb
Last active August 29, 2015 14:04
A refactoring of a hairy Arel query in 5 steps.
# Bean.find_by_sql(query)
query = Bean.
arel_table.project(Bean.arel_table[Arel.star]).
join(Roaster.arel_table).on(Roaster.arel_table[:id].eq(Bean.arel_table[:roaster_id])).
join(City.arel_table).on(City.arel_table[:id].eq(Roaster.arel_table[:city_id])).
join(Rating.arel_table.alias("bean_ratings")).on(
Arel::Table.new(:bean_ratings)[:type].eq("Bean"),
Arel::Table.new(:bean_ratings)[:target_id].eq(Bean.arel_table[:id])
).

Keybase proof

I hereby claim:

  • I am jpcody on github.
  • I am jpcody (https://keybase.io/jpcody) on keybase.
  • I have a public key whose fingerprint is EDDD 586C 07D5 F92D 383A 3B75 2789 8F36 F964 A826

To claim this, I am signing this object:

@jpcody
jpcody / gist:5422874
Last active December 16, 2015 10:49 — forked from mmaa/gist:5422852
$('#add_order_modal').on 'click', '#paste-address', togglePasteAddress
togglePasteAddress=->
$column = $ '.col1'
$column.fadeToggle 100, ->
controlGroup = $ '.col1 .control-group'
controlGroup.toggleClass 'hidden'
$column.fadeToggle 100
$.getJSON(jsonp_url, function(data) {
var membershipList = "";
$('#user').html("<a href=" + data.user_url + ">User</a>");
$('#eea').html("<a href=" + data.eea_url + ">EEA</a>");
$('#status').html("Status: " + data.eea_status);
$('#valid').html("Valid? " + data.valid);
$.each(data.active_memberships, function(name, url){
var listItem = "<li><a href=" + url + ">" + name + "</a></li>"
2012-05-18 19:05:26|DEBUG|
==> REQUEST (519467980(PUT /account)) =================================================================
DefaultHttpRequest(chunked: false)
PUT /account HTTP/1.1
Date: 1337367926000
Authorization: droplr YXBwXzBfcHVibGlja2V5OnVzZXJfMUBkcm9wbHIuY29t:CCXJERKa7ehZAiTcYRixmmMUV9c=
X-Droplr-Rootredirect: cnn.com
Content-Length: 0
Accept: */*
User-Agent: Ruby
@jpcody
jpcody / jquery-context.js
Created March 16, 2012 13:04
Maintaining an object and selector context with jQuery
var object = {
handler : function(){
$("selector").on( "click", _.bind( this.doSomething, this ));
},
doSomething : function(e){
[
postgresql-9.0,
postgresql-contrib-9.0,
postgresql-server-dev-9.0,
libpq5
].each do |pg_pack|
package pg_pack
end