Building Open Source Communities Without Burnout
25 minutes.
| travis_fold:start:worker_info | |
| [0K[33;1mWorker information[0m | |
| hostname: worker-jupiter-brain:86e580e8-c3d3-4eae-ad88-b68c1904e62a | |
| version: v2.0.0 https://github.com/travis-ci/worker/tree/ca6cb0c5d3920912b1c3acc87c44a5da2120a971 | |
| instance: 151f0690-007b-4ca9-ac94-fe657b47fe02: | |
| startup: 1m30.060489533s | |
| travis_fold:end:worker_info | |
| [0Ktravis_fold:start:system_info | |
| [0K[33;1mBuild system information[0m |
| title | Being a Good OSS Citizen |
|---|
Let's take a look at the day in the life of an open source citizen, me. I was given an issue that would allow suers to refine what kinds of sale artworks they were looking at, and it included this awesome slider so they could set min/max price ranges.
Nice.
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'cgi' | |
| episodes = Array.new | |
| doc = Nokogiri::HTML(open("http://www.notificationcenter.tv/feed.rss")) | |
| episodes = doc.xpath("//item") |
| import UIKit | |
| protocol LocationManagerDelegate { | |
| func retrievedMapLocation(location: Int) | |
| } | |
| class LocationManager { | |
| var delegate: LocationManagerDelegate? | |
| func getLocations() { |
It's been over a year since developers began using Swift to write iOS applications, and we've seen the Cocoa community expand in all directions in an effort to discover the best practices of Swift. Some of these explorations have been fruitful, and some have not. This talk presents advice to help you distinguish between what's cool and what's smart. Between substance and hype. Bring an open mind.
| class MyClass { | |
| var example: String = "" | |
| } | |
| let a = MyClass() | |
| // The state of a is that example is "" | |
| a.example = "hi" |
So you want things that are far away to be out of focus. Cool. The best way to do this is focus closer to you, so that things further away aren't in focus.
But that is impeded by a few things. As things get further from your lens, DoF gets inherently wider and wider, so getting a narrow DoF for far away things means you need to overcompensate by focusing even closer than you actually want.
To get a narrower DoF, you should open your aperture up (just like normal). But open it up more than usual to overcompensate for the distance again. Fully open if you can. The problem then becomes shutter speed; on a sunny day, opening your lens up will overexpose the photo, even at fast shutter speeds.
The solution is to block out light entering the lens with a neutral density (ND) filter. I like variable ones that you twist to adjust between 2-9 stops of light. Then you can play around and experiment.
The last thing is the lens you're using. Getting narrow DoF is harder on wider lenses. If you use a longer lens, y
| // From https://twitter.com/tewha/status/560497711397355520 | |
| #define NEVER_NULL(a, desc, ...) ({\ | |
| do {\ | |
| __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS\ | |
| if ((a) == nil) {\ | |
| [[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd\ | |
| object:self file:[NSString stringWithUTF8String:__FILE__]\ | |
| lineNumber:__LINE__ description:(desc), ##__VA_ARGS__];\ | |
| }\ |
So I'm moving my site from Squarespace to Middleman, a static website engine. Squarespace lets you export your content in a Wordpress-compatible XML file. I wrote this script to generate Middleman blog entries corresponding to published posts from the Squarespace exported XML file.
So what does it do? It finds all published text posts and reconfigures them for use with Middleman. All Squarespace-hosted images are downloaded to your computer and given unique names, and the img tags in the posts themselves are updated. I also fix a few other things like Instagram and Vimeo embeds and added some bootstrap CSS classes to img tags. It's pretty customized to my needs – not a general-purpose script.