Permalink
Browse files

should be committed...

  • Loading branch information...
Sam Jacoby
Sam Jacoby committed Apr 7, 2017
1 parent 66f78b6 commit bdeed64d1aad514261a815d62f14fc54e7a80c6a
View
@@ -1,6 +1,8 @@
RewriteEngine on
RewriteBase /
+Options -Indexes
+
ErrorDocument 404 /404.html
# redirect for workshop
View
@@ -7,8 +7,8 @@
{% block splash %}
<h1 class="splash">
Hello, I am a printer, programmer, and tinkerer. Here's a bit more <a href="/me/">about me</a>.</h1>
- <p><a href="{{ site.last_updated_resource.url }}">{{ site.last_updated_resource.meta.title }}</a> was updated <time class="timeago" datetime="{{ site.last_updated }}">{{ site.last_updated }}</time>.</p>
{% endblock %}
+ <p><a href="{{ site.last_updated_resource.url }}">{{ site.last_updated_resource.meta.title }}</a> was updated <time class="timeago" datetime="{{ site.last_updated }}">{{ site.last_updated }}</time>.</p>
{% block content -%}
Binary file not shown.
@@ -0,0 +1,153 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+
+.bar {
+}
+
+.bar:hover {
+ opacity: 0.5;
+
+}
+
+.axis {
+ font: 10px sans-serif;
+}
+
+.axis path,
+.axis line {
+ fill: none;
+ stroke: #000;
+ shape-rendering: crispEdges;
+}
+
+.x.axis path {
+ display: none;
+}
+
+.tooltip {
+ position: absolute;
+ text-align: left;
+ width: 140px;
+ padding: 12px;
+ line-height: 1.2em; font: 12px sans-serif;
+ background: white;
+ border: solid 1px #aaa;
+ pointer-events: none;
+}
+
+</style>
+<body>
+<div id="spicebeam"></div>
+<p style="text-align: right;" class="source small"><strong>Source: <a href="http://www.iowadot.gov/">Iowa DOT</a></strong></p>
+<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
+<script type="text/javascript">
+var margin = {top: 20, right: 20, bottom: 30, left: 40},
+ width = 960 - margin.left - margin.right,
+ height = 350 - margin.top - margin.bottom;
+
+var x = d3.scale.ordinal()
+ .rangeRoundBands([0, width], .06);
+
+var y = d3.scale.linear()
+ .range([height, -2]);
+
+var hueScale = d3.scale.linear()
+ .rangeRound([100, 11]);
+
+var xTime = d3.time.scale()
+ .range([2, width]);
+
+var xAxis = d3.svg.axis()
+ .scale(xTime)
+ .orient("bottom")
+ .tickFormat(d3.time.format("%b %y"))
+ .ticks(d3.time.months, 1);
+
+
+var yAxis = d3.svg.axis()
+ .scale(y)
+ .orient("left")
+ .ticks(10);
+
+
+var msg = d3.select("body").append("div")
+ .attr("class", "tooltip")
+ .style("opacity", 1e-6);
+
+ format = d3.time.format("%m-%d-%Y");
+ var mouseOver = function(el) {
+ msg.html("<p><strong>"+ format(el.date) + "</strong></p><p>" + el.message + "</p>")
+ .style("opacity", 1);
+}
+
+function mouseMove() {
+ msg
+ .style("left", d3.event.pageX + "px")
+ .style("top", (d3.event.pageY - 100) + "px");
+}
+
+var svg = d3.select("#spicebeam").append("svg")
+ .attr("width", width + margin.left + margin.right)
+ .attr("height", height + margin.top + margin.bottom)
+ .append("g")
+ .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+
+d3.csv("/message_mondays.csv", type, function(error, data) {
+ x.domain(data.map(function(d) { return d.date; }));
+ xTime.domain([d3.min(data, function(d) { return d.date }), d3.max(data, function(d) { return d.date; })])
+
+ y.domain([0, d3.max(data, function(d) { return d.crashes; })]);
+ hueScale.domain([0, d3.max(data, function(d) { return d.crashes; })]);
+
+ svg.append("g")
+ .attr("class", "x axis")
+ .attr("transform", "translate(0," + height + ")")
+ .call(xAxis)
+ .selectAll("text")
+ .attr("y", "16")
+ .attr("x", "0")
+ .attr("dy", ".35em")
+ .attr("transform", "rotate(0)")
+ .style("text-anchor", "start");
+
+ svg.append("g")
+ .attr("class", "y axis")
+ .call(yAxis)
+ .append("text")
+ .attr("transform", "rotate(-90)")
+ .attr("y", 6)
+ .attr("dy", ".71em")
+ .style("text-anchor", "end")
+ .text("Crashes (weekly)");
+
+ svg.selectAll(".bar")
+ .data(data)
+ .enter().append("rect")
+ .attr("class", "bar")
+ .attr("x", function(d) { return xTime(d.date); })
+ .attr("width", x.rangeBand())
+ .attr("y", function(d) { return y(d.crashes); })
+ .attr("height", function(d) { return height - y(d.crashes); })
+ .attr("fill", function(d) {
+ if(d.crashes != 700) {
+ // hack to display gray where I don't have data
+ return "hsl(" + hueScale(d.crashes) + ",90%,50%)";
+ }
+ return "#aaa";
+ })
+ .on('mouseover', mouseOver)
+ .on('mousemove', mouseMove);
+
+});
+
+function type(d) {
+ //d.date = +d.date;
+ d.date = new Date(d.date)
+ d.crashes = +d.crashes;
+ return d;
+}
+</script>
+
+</body>
@@ -0,0 +1,83 @@
+date,message,crashes
+8/5/13,156 Traffic Deaths this Year - Don't Add to this number,821
+8/12/13,Driving Long? Take a Break,848
+8/19/13,Back to School Stay Alert,828
+8/26/13,62 Were Unbuckled,926
+9/2/13,Drive Sober or Get Pulled Over,786
+9/9/13,Buckle Up It's a Good Idea,946
+9/16/13,Children are Safest in Backseat,983
+9/23/13,Avoid Driver's Blind Spot,895
+9/30/13,Share the Road with Motorcycles,939
+10/7/13,Late? Don't Risk it Slow Down,912
+10/14/13,Use Caution Around School Buses,952
+10/21/13,Start Them Young Teach Safe Driving,1074
+10/28/13,Includes 1 Bicyclist 11 Pedestrians,1091
+11/4/13,Don't Veer for Deer,1212
+11/11/13,Winter Weather? Turn Off Cruise Control,1298
+11/18/13,Be a Survivor Buckle Up,1269
+11/25/13,Report Drunk Driving Call 911,949
+12/2/13,Eyes on Road Hands on Wheel,1472
+12/9/13,Ice & Snow Take it Slow,1493
+12/16/13,Don't be a Projectile Buckle Up,1446
+12/23/13,Santa's Coming Have You Been a Good Driver,891
+12/30/13,Drive Sober or Get Pulled Over,1387
+1/6/14,Control Your Fate the Text Can Wait,990
+1/13/14,Vehicle on Shoulder? Move Over,1164
+1/20/14,Your Mom Called are You Buckled,1235
+1/27/14,Arrive Alive Don't Drink & Drive,1041
+2/3/14,Be on the Winning Team Drive Safe,1604
+2/10/14,5 Min Late Won't Kill You Speeding Can,1500
+2/17/14,Slick Roads and Cruise Control Don't Mix,1187
+2/24/14,Be Alert Your Life Depends on it,1277
+3/3/14,Not Buckled? Seriously??,941
+3/10/14,Move Disabled Vehicles to Shoulder,735
+3/17/14,Drink Green Beer See Red Lights in Rearview Mirror,643
+3/24/14,Pass on Left - Drive on Right,852
+3/31/14,Warmer Weather Watch for Work Zones,739
+4/7/14,One Text or Call Could Wreck it All,842
+4/14/14,Drive Drunk Meet a Cop,834
+4/21/14,Snooze You Lose Don't Drive Drowsy,784
+4/28/14,Look for Motorcycles Share the Road,792
+5/5/14,See Tracks Think Train,828
+5/12/14,Click it or Ticket,862
+5/19/14,It's Racing Season Leave Speed for the Track,855
+5/26/14,Drive Hammered Get Nailed,928
+6/2/14,Lots Riding on Your Tires Check the Pressure,945
+6/9/14,School's Out Watch for Kids on Bikes,955
+6/16/14,Move Over for Maintenance & Emergency Vehicles,944
+6/23/14,Put Down Your Phone and Drive,885
+6/30/14,Drink + Drive = Stupid Don't be Stupid,940
+7/7/14,Great Weekend? Buckle Up for Another,889
+7/14/14,Work Zones We Don't Speed Thru Your Office,798
+7/21/14,"""No Zone"" Avoid Trucker's Blind Spots",832
+7/28/14,Distracted Driving is More Than Texting,859
+8/4/14,Buckle Up and Just Drive,808
+8/11/14,Drive Sober or Get Pulled Over,845
+8/18/14,School's Open Don't Pass a Stopped School Bus,873
+8/25/14,Stay Alive Don't Text and Drive,908
+9/1/14,Drinking Today? Choose a Designated Driver,860
+9/8/14,Tailgating is for Football Not Highways,924
+9/15/14,Love Your Child? Buckle Them Up,956
+9/22/14,Does Your Blinker Not Work or What?,1002
+9/29/14,Get Your Head Out of Your Apps Drive Safely,926
+10/6/14,Not Buckled? What's Holding Your Back?,975
+10/13/14,Drive Like Your Life Depends on it,1042
+10/20/14,Teens Drive Like Their Parents,1130
+10/27/14,Don't Become a Ghost Drive Safely,1148
+11/3/14,Dawn and Dusk Deer are Near,1256
+11/10/14,Not Buckled? You're Killing Me Smalls,1759
+11/17/14,Snow Plows Need Room to Groom,1176
+11/24/14,Dear Seat Belt Thank You for Saving Lives,1379
+12/1/14,Booze Cruise Lose,937
+12/8/14,That's 24 More Than Last Year,971
+12/15/14,Texting and Driving is Like Oil and Water,1105
+12/22/14,Ho Ho Ho Buckle Up and Go,878
+12/29/14,Start 2015 Right Don't Drink & Drive Day or Night,1000
+1/5/15,Pass on Left - Drive on Right,700
+1/12/15,Don't Crowd the Plow 20 Hit Last Week,700
+1/19/15,It's Not a Race Leave Some Space,700
+1/26/15,In the Blink of an Eye You Could Die,700
+2/2/15,Don't Drive Angry,700
+2/9/15,Hey Bobblehead Stop Looking at Your Phone,700
+2/16/15,Drive to Save Lives,700
+2/23/15,Pass on Left - Drive on Right,700
@@ -50,8 +50,9 @@
I've used Flickr's lovely embedded iframes to serve most of the images on this site, but lately, I've been frustrated with how slowly it loads. On some of the image heavy pages on my [motorcycle](/projects/motorcycle/) project, it's very noticeable. I don't think the slideshow format works well for this site, anyhow, so I wanted to look into how to do my image hosting with `s3`[^s3]. I didn't want to change my own development habits, though, so I turned to my `.htaccess` file, which my host, [ASmallOrange](https://asmallorange.com/), respects, even though I'm in a super-cheap shared VPS with very limited shell access.
```apache
+RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} \.jpg$
-RewriteRule ^.*/media/img/(.*\.jpg)$ https://s3.amazonaws.com/Shackman/samjacoby.com/$1
+RewriteRule ^.*media\/img\/(.*)$ https://s3.amazonaws.com/Shackman/samjacoby.com/$1 [L]
```
That's it! In the `fabfile.py` that I use to manage the deployment of this website, I also added the following:
@@ -1,3 +1,13 @@
+---
+title: Art & Workmanship
+summary: For a time long past.
+date: 2012-9-26 10:08:23
+tags:
+ - craft
+track: True
+exclude: True
+---
+
"At the present moment we are more fond of the ingenuity than the qualities. But without losing the ingenuity we could, in places, still have the qualities if we really wanted them."
David Pye
@@ -1,6 +1,6 @@
---
title: Rolling with Backbone + Marionette
-summary: In which I learn something new about structuring web applications.
+summary: Learning something new about structuring web applications.
date: 2015-05-05 20:26:57
track: True
exclude: False
@@ -52,7 +52,9 @@
<object data="/media/img/backbone-diagram.svg" type="image/svg+xml"></object>
-This, of course, is just one application among many. What I've found nice about this construction, is that though sometimes individual sub-applications can feel over-engineered (application -> controller -> view -> template), for fairly simple functionality like a login/logout pane, that level of complexity is fixed and well-contained.
+This, of course, is just one sub-application among many. Any larger web-application will be a constellation of interconnected modules—some handling the basics of user creation, editing, and display (like above). Others, devoted to business logic, may never be indivually routable, but only called upon to say, process a set of data.
+
+What I've found nice about this construction, is that though sometimes individual sub-applications can feel over-engineered (application -> controller -> view -> template), for fairly simple functionality like a login/logout pane, that level of complexity is fixed and well-contained.
[0]: https://www.youtube.com/watch?v=qWr7x9wk6_c
[1]: https://www.youtube.com/watch?v=PrQSpdWkN6Q
@@ -1,10 +1,13 @@
---
title: Working at The New York Times
+summary: I work at *The New York Times*, which coincidentally, is my favorite newspaper. Here are a few things I've worked on.
date: 2016-06-28 08:48:50
track: False
---
-
-[//]: # (I started working at the Times in September of 2015. It's been a return to journalism for me. I wrote in college; an alarming minute amount for the Harvard Crimson, though I was turned off by the zealous young newsies there; and then for the Harvard Independent, which was a chiller assemblage in general.)
+{% block post %}
+{% mark excerpt %}
+I work at *The New York Times*, which coincidentally, is my favorite newspaper. Here are a few things I've worked on.
+{% endmark %}
## Olympics 2016
@@ -17,4 +20,4 @@
Listy
Scoop That
-
+{% endblock %}
@@ -1,13 +1,16 @@
---
title: Motorcycles.
-summary: Bikes for nice people.
+summary: Bikes for nice people
date: 2013-09-16 07:37:22
exclude: True
---
-
-In a fit of consumptive vigor, I picked up an old Honda motorocycle this summer. A classic, a Honda CB500. I can't quite say why, except that I've been an enthusiastic bicyclist for many years, and this seemed a natural progression. A motorcycle is just a big bike. With a motor. That goes 100 mph.
+{% block post %}
+In a fit of consumptive vigor, I picked up an old Honda motorocycle a few summers ago. A classic, a Honda CB500. I can't quite say why, except that I've been an enthusiastic bicyclist for many years, and this seemed a natural progression. A motorcycle is just a big bike. With a motor. That goes 100 mph (almost). Read all [about it]()
## Bicycle Shops
Does anyone like them? I consider myself in their core demographic, at least, mostly: I'm white, bearded, some would say scrawny, I say pleasingly lithe (*swoon*). Walk into a bike shop anywhere across our fine nation, you'll see people who look like me, the carless, the vaguely eco-conscious, the righteous, the pseudo-vegetarian. And the bizarre thing--more often than not, these guys are assholes. That's certainly not always the case -- there are some fine stand-outs: Quad Bikes, administered by a fair and erudite crew at Harvard. And I once spent a pleasant half-hour at Gurkin's in New Orleans.
-A devestating memory from my childhood, or at least, from my adoloscense, was going into a "professional" bike store with my father. He, the consumate biker (or so I thought), was so dismissed, so...blah blash.
+A pecularliy memory from my childhood, or at least, from my adoloscense, was going into a "professional" bike store with my father. He, the consumate biker (or so I thought), was summarily dismissed by the goateed mechanic.
+
+Why?
+{% endblock %}
@@ -1 +1 @@
-It is unbelievable to me how incredibly inexpensive products are in American stores. With my relocation to Iowa comes a re-exposure to the pricing offered in America's great discount superstores. WalMart, post-back-to-school notebooks: 17 cents a-piece. A laminate dresser, 18.99. And so on, the parade of bottom-of-the-barrel prices assaults the senses and disrupts ones' sensibilities.
+Inequality is on the rise. Nonetheless, it is unbelievable how incredibly inexpensive products are in American stores. With my relocation to Iowa comes a re-exposure to the pricing offered in America's great discount superstores. WalMart, post-back-to-school notebooks: 17 cents a-piece. A laminate dresser, 18.99. And so on, bottom-of-the-barrel prices disrupt my sensitibilities and distort any reasonable analysis.
@@ -0,0 +1,24 @@
+---
+title: Backbone Marionette
+summary: Fumbling through the darkness
+date: 2015-04-06 11:54:57
+tags:
+ - computers
+track: False
+exclude: True
+---
+Over at Formlabs, we've been playing with Backbone + Marionette as we're building a few new frontend applications. It's been fun getting up-to-speed on new technologies. For me, at least, there's also been a steep learning curve. I really like to know the "right" way of doing things, and with Backbone, in general, there isn't ever a single answer.
+
+I'm coming to appreciate the strength of that as a design pattern, but it's not very friendly to novices. Think about a traditional craft apprenticeship, what few there are—you'd spend weeks, months, years, perfecting the simplest of gestures and motions. You copy the masters. The "right" way is usually "right" because someone else has done the hard, time-consuming work of fumbling through what works and what doesn't.
+
+OK — that's my rant on Backbone Marionette. At any rate, it hasn't proved to be an issue, because a number of the Marionette core-team members have documented their practices fairly well.
+
+Interestingly (for me), I found that I learned a lot better watching videos rather than reading the thousand-odd assorted theories on Stack Overflow. In a video, you actually get more of the intention behind someones' thinking, which helped me bake better decisions.)
+
+I found these resources the most useful—hat-tip to the Bocoup Crew for making this good stuff available.
+[Brian Mann - The tools and patterns for building large-scale Backbone applications](https://www.youtube.com/watch?v=qWr7x9wk6_c)
+[Jeremy Fairbank - Building modular and component driven architecture in Backbone.js and Marionette.js.](https://www.youtube.com/watch?v=PrQSpdWkN6Q)
+[James Smith - Marionette The Backbone Framework](https://www.youtube.com/watch?v=EvQnntaqVdE)
+
+At any rate, so armed by the gesticulating of these friendly gentleman, I started to dive into the architecture of our application.
+
@@ -1,15 +1,17 @@
---
-title: Reviewing Shopcraft as Soulcraft
+title: Shopcraft as Soulcraft
summary: A few thoughts on a paean to manual labor, craft, and hard-won expertise.
date: 2015-06-22 12:06:55
track: true
thumbnail: wheel.jpg
---
{% block post %}
{% mark excerpt %}
-{% endmark %}
*[Shopcract as Soulcraft][1]* belongs to the category of things that make me feel bad about myself. It keeps company with technology executives who turn [treehouse builders](http://www.nytimes.com/2015/06/07/style/escape-to-bro-topia.html), itinerant and beautifully-penniless bicycle [adventurers](http://www.bicycling.com/culture/people/ultra-romance-man-left-normal-life-behind-find-adventure), and Instagram feeds of lithe young people on sunwashed yacht outtings with Derrida paperbacks. If you're into that good kind of hurt (and I am), it's a solid, quick read and well-worth picking up.
+[1]: http://www.thenewatlantis.com/publications/shop-class-as-soulcraft
+{% endmark %}
+
My dad recently sent me a copy.[^dad] I had thumbed through it when it was first published, thought it was interesting, and put it aside. Now that I've been working on my own [motorcycle restoration project](/projects/motorcycles/), the time seemed ripe to give it another go.
Per usual for this sort of thing, if you're looking for sagas from a mechanic's workbench, look elsewhere.[^zen] Crawford is a philospoher, and the snappy photo of a vintage BMW on the cover aside, the subtitle, "an inquiry into the value of work," is what you'll be getting. That's fine with me. There are plenty of mechanical war stories on the [SOHC4 forums](http://forums.sohc4.net/index.php?topic=91492.0).
@@ -45,7 +47,6 @@
Pg. 82. Fixing things may be a cure for narcissism.
-->
-[1]: http://www.thenewatlantis.com/publications/shop-class-as-soulcraft
[^dad]: I think this is actually the *second* copy he's sent me. He insists otherwise.
[^moral]: Robert Jackall's *Moral Mazes* is a jaw-dropping read, especially for those in the upwardly-ambiguous world of mid-level executives,
Oops, something went wrong.

0 comments on commit bdeed64

Please sign in to comment.