Very simple convenience class to make working with Auto-Layout easier.
class Layout {
let views: [String:UIView]
let superview: UIView
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'logger' | |
s3 = AWS::S3.new( | |
access_key_id: '<ACCESS KEY>', | |
secret_access_key: '<SECRET KEY>' | |
) | |
logger = Logger.new('./s3_restores.log') |
func debounce( delay:NSTimeInterval, #queue:dispatch_queue_t, action: (()->()) ) -> ()->() { | |
var lastFireTime:dispatch_time_t = 0 | |
let dispatchDelay = Int64(delay * Double(NSEC_PER_SEC)) | |
return { | |
lastFireTime = dispatch_time(DISPATCH_TIME_NOW,0) | |
dispatch_after( | |
dispatch_time( | |
DISPATCH_TIME_NOW, |
struct もじれつ: Printable { | |
let description: String | |
init(string: String) { | |
var mutableString = NSMutableString(string: string) as CFMutableString | |
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 { | |
self.description = mutableString as NSString | |
} else { | |
self.description = string | |
} |
Even though I star these on GitHub, it's so easy to lose track of 'em, so I'm compiling a list here.
The CocoaPods team is looking into what it'll take to get Swift code to work more cleanly with iOS 8 and Xcode 6.
Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw
is officially deprecated and removed in OS X Yosemite. Pow requires another program pf
to handle the port forwarding.
Create file /etc/pf.anchors/pow
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
NSIndexPath *selectedRowIndexPath = [self.tableView indexPathForSelectedRow]; | |
if (selectedRowIndexPath) { | |
[self.tableView deselectRowAtIndexPath:selectedRowIndexPath animated:YES]; | |
[[self transitionCoordinator] notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if ([context isCancelled]) { | |
[self.tableView selectRowAtIndexPath:selectedRowIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; |
The attack detailed below has stopped (for the time being) and almost all network access for almost all customers have been restored. We're keeping this post and the timeline intact for posterity. Unless the attack resumes, we'll post a complete postmortem within 48 hours (so before Wednesday, March 26 at 11:00am central time).
Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at 8:46 central time, March 24 2014. The goal is to make Basecamp, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.
Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'pp' | |
directory = File.expand_path ARGV[0] | |
args = ARGV[1,ARGV.length-1].join(' ') | |
class Track | |
attr_accessor :source, :destination, :base_dir |
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
@end |