Mountain Lion (10.8) has three main difference compared to Lion (10.7):
- XCode 4.4 does not install Command Line Tools by default
- X11 isn't available anymore
- The installed version of OpenSSL has some bugs
Last week I attempted to use the CSS sprites feature of Compass for the second or third time. It's been a struggle each time, but the power and potential is there, so I keep coming back. This time was a bit different, though, because I finally decided to stop relying on the docs and dive into the code.
Before I go into the nitty-gritty, let's take a step back and talk about why I
##The Singleton Pattern
class SantaClaus {
private static uniqueInstance : SantaClaus;
In case you don't know me already, I'm Jarrod Nettles, a Senior Developer at Apple Inc. I also go by the Twitter handle @hayvok, and blackshawk on Github (don't ask me why they're different). I have no real, formal blog since, well, I work at Apple. I'm posting this because I confused a good many people and I feel honor-bound to explain.
On April 1st Hacker News had their "Who's Hiring" thread. Since I'm currently looking for a developer, I decided to go ahead and post. Here's the content of that post, along with a link to the original.
https://news.ycombinator.com/item?id=5475813 - Original HN Post
Apple Inc: Cupertino, CA - Web Developer (PHP, Node.js, Ember.js) - Sorry, no remote!! Relocation offered. (I know, I know...) We're rebuilding an internal app from scratch and it needs to be blazing fast and real-time.
Here's our tech stack (right now).
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
jQuery.fn.brightness = function() { | |
var bg_color, rgba, y; | |
bg_color = this.css('background-color'); | |
if ((bg_color != null) && bg_color.length) { | |
rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/); | |
if (rgba != null) { | |
if (rgba[4] === '0') { | |
if (this.parent().length) return this.parent().brightness(); | |
} else { | |
y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3]; |
// http://stackoverflow.com/questions/15829172/stop-chrome-back-forward-two-finger-swipe | |
$(document).on('mousewheel', function(e) { | |
var $target = $(e.target).closest('.scrollable-h'); | |
if ($target.scrollLeft () <= 4) { | |
$target.scrollLeft(5); | |
return false; | |
} | |
}); | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// Parallax scrolling script that should be assigned to a layer | |
/// | |
/// This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/ | |
/// |
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"