This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ?M | |
| M | |
| .$ D? | |
| :M M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSDictionary groupItems(NSArray *items) { | |
| int bucket = 0; | |
| NSDictionary *groupedItems = [NSDictionary alloc]; | |
| id prevItem; | |
| const kItemTimeDistanceThreshold = 30; | |
| [groupedItems setObject:[NSArray alloc] forKey:bucket]; | |
| // I can't remember how to properly iterate in Objective C, | |
| // so let's pretend you can use foreach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| twttr.currentUser.relationshipWith(name, { | |
| success: function(relationship) { | |
| if (canDM) { | |
| that.trigger('dmSuccess', [tweet, that.options.statusAction]); | |
| } else { | |
| error(); | |
| } | |
| }, | |
| error: error | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| chmod -x ~/workspace/twitter/.git/hooks/pre-commit | |
| git commit $@ | |
| chmod +x ~/workspace/twitter/.git/hooks/pre-commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hi, Dan; | |
| Patrick and I were discussing how to resolve today's incident, which stemmed from the fact that anything with a ".js" file extension is served from Apache, not Rails, in production. We've got an end point that returns a dynamic provide statement with a bunch of exported data. Looking at it, it's really just a vessel for that exported data. | |
| How would you feel about extending Loadrunner to automatically export requests to JSON endpoints? | |
| Here's (roughly) what we have now: | |
| In the HTML of the page, we include the data file like this: | |
| using('/account/bootstrap_data.js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Where "Foobar" is the name I gave my modem under System Preferences > Network | |
| networksetup -connectpppoeservice Foobar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Assume that this component exists somewhere: */ | |
| twttr.klass('twttr.components.Person', function(name, location) { | |
| this.name = name; | |
| this.location = location; | |
| }); | |
| /* A few ideas for the syntax we should use for asyncronous instantiation: */ | |
| // 1. Pass variable number of constructor arguments and callback as the last argument | |
| var callback = function(instance) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Assume that this component exists somewhere: */ | |
| twttr.klass('twttr.components.Person', function(name, location) { | |
| this.name = name; | |
| this.location = location; | |
| }); | |
| /* A few ideas for asyncronous instantiation: */ | |
| // 1. Pass variable number of constructor arguments and callback as the last argument | |
| var callback = function(instance) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is probably a pretty niche feature request, but I'll throw it out here anyway. | |
| For most apps, taking up half the width of the screen is perfect. For a certain class, narrower would be better. The best example of this would be IM contact lists. | |
| So, I humbly suggest that tapping "Move left" when a window has already been pinned to the left edge shrink it from 50% width to 25% width. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Bug: Windows can be moved from secondary monitor onto primary monitor, but not vice versa. | |
| Steps to reproduce. | |
| Begin with a window on your secondary monitor (let's assume that this is the left-most monitor). | |
| 1. "Move right" so it's pinned to the right-hand side of the secondary monitor. | |
| 2. "Move right" again. It should not be pinned to the left-hand side of the primary monitor. | |
| 3. "Move left". Nothing happens. |