Skip to content

Instantly share code, notes, and snippets.

@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

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.

1. Anchor file

Create file /etc/pf.anchors/pow

@steipete
steipete / AppDelegate.m
Last active August 29, 2015 14:01
I'm using Aspects to hook into Xcode's test system to update the UI as the tests are running - this provides a nice feedback what's currently going on. https://github.com/steipete/Aspects
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
self.window.backgroundColor = [UIColor whiteColor];
UIViewController *controller = [UIViewController new];
controller.title = @"Testing...";
self.rootViewController = [[UINavigationController alloc] initWithRootViewController:controller];
self.window.rootViewController = self.rootViewController;
[self.window makeKeyAndVisible];
// Use Aspects to hook into XCTestCase to get better feedback than just the log.
@soffes
soffes / Podfile
Created May 8, 2014 05:22
Pods used in Litely 1.0
platform :ios, '7.0'
# Core Data
pod 'SSDataKit', :git => 'https://github.com/soffes/SSDataKit', :commit => '60d432e734ae11e8cfedac8ac5f68c0ce8a1b9ba'
# On-disk & in-memory caching
pod 'SAMCache'
# Fast image view for Core Image
pod 'SAMCoreImageView', '0.1.3'
@0xced
0xced / NSObject+Subclasses.h
Last active September 4, 2017 06:37
NSObject category to get subclasses
#import <Foundation/Foundation.h>
@interface NSObject (Subclasses)
+ (NSSet *) subclasses_xcd;
@end
// Copyright (c) 2012-2013 Peter Steinberger (http://petersteinberger.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@igrigorik
igrigorik / ruby-1.9-tips.rb
Created February 3, 2011 17:19
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@davist11
davist11 / jquery.equalHeight.js
Created July 20, 2010 20:33
Equal heights plugin
;(function($) {
// Equal height items
$.fn.equalHeight = function(options) {
var opts = $.extend({}, $.fn.equalHeight.defaults, options);
return this.each(function() {
var $this = $(this),
o = $.meta ? $.extend({}, opts, $this.data()) : opts,
maxHeight = 0;