Put this in your config.fish
run
code path/to/project
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Shifts to Parentheses</name> | |
<appendix>Shifts, when pressed alone, type parentheses. When used with other keys they're normal shifts.</appendix> | |
<identifier>private.shifts_to_parens</identifier> | |
<!-- This is the basic mapping. --> | |
<autogen>--KeyOverlaidModifier-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L</autogen> |
-------------------------------------------------------------------------------- | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main | |
( main | |
) where | |
-------------------------------------------------------------------------------- | |
import Control.Concurrent (forkIO) | |
import Control.Monad (forever, unless) |
-------------------------------------------------------------------------------- | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main | |
( main | |
) where | |
-------------------------------------------------------------------------------- | |
import Control.Concurrent (forkIO) | |
import Control.Applicative ((<$>)) |
/// 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 |
Put this in your config.fish
run
code path/to/project
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
#import <UIKit/UIKit.h> | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?
There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.
Here I present a composable pattern for pure state machiness with effects,
git config --global alias.trim '!f() { git branch | grep -v "\*" | xargs -n 1 git branch -D; }; f' |