Table of Contents generated with DocToc
|# Aside from removing Ruby on Rails specific code this is taken verbatim from|
|# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome|
|# - Ryan Florence (http://ryanflorence.com)|
|# Install this hook to a remote repository with a working tree, when you push|
|# to it, this hook will reset the head so the files are updated|
|if ENV['GIT_DIR'] == '.'|
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
1. The Layer Tree
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the
layer tree. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called
CALayer. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
- view hierarchy
- layer tree
|# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine|
|# This is how I upload my new Sol Trader builds (http://soltrader.net)|
|# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash|
|S3KEY="my aws key"|
|S3SECRET="my aws secret" # pass these in|
What is the appeal of dynamically-typed languages?
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.
For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.
But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.
SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil