(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /// Observes a run loop to detect any stalling or blocking that occurs. | |
| /// | |
| /// This class is thread-safe. | |
| @interface GHRunLoopWatchdog : NSObject | |
| /// Initializes the receiver to watch the specified run loop, using a default | |
| /// stalling threshold. | |
| - (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
| /// Initializes the receiver to detect when the specified run loop blocks for |
| // | |
| // MultiDirectionAdjudicatingScrollView.swift | |
| // Khan Academy | |
| // | |
| // Created by Andy Matuschak on 12/16/14. | |
| // Copyright (c) 2014 Khan Academy. All rights reserved. | |
| // | |
| import UIKit | |
| import UIKit.UIGestureRecognizerSubclass |
| #!/bin/sh | |
| FILE_URL=http://speedtest.wdc01.softlayer.com/downloads/test10.zip | |
| if [ -e /usr/bin/curl ] && [ -e /usr/bin/bc ] && [ -e /usr/bin/xargs ]; then | |
| echo "scale=2; `curl --progress-bar -w "%{speed_download}" $FILE_URL -o /dev/null` / 131072"\ | |
| | bc\ | |
| | xargs -I {} echo {} mbps | |
| elif [ -e /usr/bin/curl ]; then | |
| curl -o /dev/null $FILE_URL |
| // 1. Save gist as fixsvpplylinks.js | |
| // 2. Install node.js (http://nodejs.org/) | |
| // 3. 'npm install async request' | |
| // 4. 'node fixsvpplylinks.js /path/to/wants.json' | |
| // 5. Wait. | |
| // 6. Don't worry about those EventEmitter warnings! | |
| // 7. Done. | |
| // 8. If there's any issues then give me a tweet (@artcommacode) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
layout: post title: "ReactiveCocoa Unit Testing Tips" date: 2013-09-22 20:45 comments: true categories:
| /** | |
| Provides the ability to verify key paths at compile time. | |
| If "keyPath" does not exist, a compile-time error will be generated. | |
| Example: | |
| // Verifies "isFinished" exists on "operation". | |
| NSString *key = SQKeyPath(operation, isFinished); | |
| // Verifies "isFinished" exists on self. |
| // = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
| // = How to compile: | |
| // % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
| // % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
| // % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
| // -licuuc -lz -lbz2 | |
| #include <cassert> | |
| #include <cctype> | |
| #include <iostream> | |
| #include <memory> |
| #!/usr/bin/env ruby | |
| # | |
| # This script can be used to check the in-store availability of the iPhone 5S. | |
| # By default, it searches for all AT&T models. You can change this by editing | |
| # the MY_DEVICES array below. While the Apple API supports searching for | |
| # multiple devices at once, there is a limit. | |
| # | |
| # Once you have properly configured the MY_DEVICES array, you can run this script | |
| # from the terminal. It takes a single parameter, which should be the zip code you | |
| # wish to use for your search. |
| From c5a7d1115318bd02145a4b41109464d564b37af9 Mon Sep 17 00:00:00 2001 | |
| From: David Weinstein <[email protected]> | |
| Date: Mon, 14 Jan 2013 12:21:37 -0500 | |
| Subject: [PATCH] add HID support to android gadget. | |
| --- | |
| drivers/usb/gadget/android.c | 189 ++++++++++++++++++++++++++++++++++++++++++ | |
| drivers/usb/gadget/f_hid.c | 8 +- | |
| 2 files changed, 194 insertions(+), 3 deletions(-) |