Skip to content

Instantly share code, notes, and snippets.

Joshua Cody jpcody

View GitHub Profile
View keybase.md

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:

View front-end-engineer.md

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:

View arel_talk_notes.md

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 Aug 29, 2015
A refactoring of a hairy Arel query in 5 steps.
View 1_original.rb
# 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])
).
View keybase.md

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:

View gist:5422874
$('#add_order_modal').on 'click', '#paste-address', togglePasteAddress
togglePasteAddress=->
$column = $ '.col1'
$column.fadeToggle 100, ->
controlGroup = $ '.col1 .control-group'
controlGroup.toggleClass 'hidden'
$column.fadeToggle 100
View gist:4228395
$.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>"
View request.txt
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 Mar 16, 2012
Maintaining an object and selector context with jQuery
View jquery-context.js
var object = {
handler : function(){
$("selector").on( "click", _.bind( this.doSomething, this ));
},
doSomething : function(e){
View server.rb
[
postgresql-9.0,
postgresql-contrib-9.0,
postgresql-server-dev-9.0,
libpq5
].each do |pg_pack|
package pg_pack
end
You can’t perform that action at this time.