This file contains 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
% brew --config :( | |
HOMEBREW_VERSION: 0.9.4 | |
ORIGIN: https://github.com/mxcl/homebrew.git | |
HEAD: ba09af5da322ce5506be593629a20835702c5d26 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit arrandale | |
OS X: 10.8.4-x86_64 | |
Xcode: 5.0 => /Applications/Xcode5-DP5.app/Contents/Developer | |
CLT: 5.0.0.0.1.1372877146 |
This file contains 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
self.collectionView = ({ | |
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; | |
UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds | |
collectionViewLayout:flowLayout]; | |
collectionView.delegate = self; | |
collectionView.dataSource = self; | |
collectionView; |
This file contains 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
module MyApp::ModelNameFix | |
def model_name | |
@_model_name ||= ActiveModel::Name.new(self, nil, self.name.sub(/^#{self.parent.name}::/, '')) | |
end | |
def namespaced_model_name | |
@_namespaced_model_name ||= ActiveModel::Name.new(self) | |
end | |
# Work with Draper |
This file contains 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
<msch> RhodiumToad: so the simple advice is, "always use timestamptz, never timestamp"? | |
<RhodiumToad> when storing a future time, the way to decide is this: | |
<RhodiumToad> there are a few apps where timestamp without time zone has its uses. | |
<RhodiumToad> e.g. things like calendaring / scheduling which are dealing mostly in future times | |
<RhodiumToad> does it matter how many seconds/minutes/hours there are between now and then, | |
<RhodiumToad> or does it matter what the clock on the wall will read then | |
<RhodiumToad> in the first case you need timestamptz, in the second case, timestamp without time zone, | |
<RhodiumToad> possibly with a separate field (possibly in some other table) storing the timezone name | |
<RhodiumToad> otherwise, you run into the same problem that many calendaring apps did when the US DST rules were changed |
This file contains 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
/* | |
* Generated by class-dump 3.3.4 (64 bit). | |
* | |
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. | |
*/ | |
#pragma mark Named Structures | |
struct CGAffineTransform { | |
double _field1; |
This file contains 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
During the last months, development on Vico has mostly stalled. This is frustrating for many users, and for me, as I no longer can spend as much time on Vico as I'd like. My plans for Vico is grander than that. | |
Therefore I'm releasing the source code on github and encourage the community to contribute and help build a truly kick-ass editor. | |
Vico will be removed from the App Store. Being there in the first place has been problematic, and the sandboxing requirement makes it finally incompatible. A new build is available on thedownload page without any trial restrictions. | |
If you want to get involved with Vico, I'm looking forward to see you here on the mailing list. |
This file contains 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
[1,2,3].map.with_index { |x, i| puts "#{x} #{i}"; x+1 } | |
# 1 0 | |
# 2 1 | |
# 3 2 | |
# => [2, 3, 4] | |
[1,2,3].each.with_object("q") { |x, obj| puts "#{x} #{obj}"; obj << x.to_s } | |
# 1 q | |
# 2 q1 |
This file contains 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
class Base | |
something_something :mappings | |
self.mappings = {} | |
end | |
class FirstChild < Base | |
self.mappings[:foo] = :bar | |
end | |
class SecondChild < Base |
This file contains 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
# Configuration file for dnsmasq. | |
# | |
# Format is one option per line, legal options are the same | |
# as the long options legal on the command line. See | |
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. | |
# The following two options make you a better netizen, since they | |
# tell dnsmasq to filter out queries which the public DNS cannot | |
# answer, and which load the servers (especially the root servers) | |
# unnecessarily. If you have a dial-on-demand link they also stop |
This file contains 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
// checks if already in current queue, prevents deadlock | |
void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_block_t block) { | |
if (dispatch_get_current_queue() == queue) { | |
block(); | |
}else { | |
dispatch_sync(queue, block); | |
} | |
} | |
// problem: |