This is a curated list of iOS (Swift & ObjC) frameworks which are inspired by React and Elm.
- ReactSwift by @ColinEberhardt
- https://github.com/ColinEberhardt/ReactSwift
# blog post | |
# | |
# https://www.jessesquires.com/blog/customizing-git-log/ | |
git log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset' |
This is a curated list of iOS (Swift & ObjC) frameworks which are inspired by React and Elm.
#!/bin/bash | |
for f in `ls *.gyb` | |
do | |
echo "Processing $f" | |
name=${f%.gyb} | |
../../../utils/gyb -D CMAKE_SIZEOF_VOID_P=8 -o $name $f --line-directive "" | |
done |
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,
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys
and look for sec
, use the key ID for the next stepgit
to use GPG -- replace the key with the one from gpg --list-secret-keys
#warning This still misses safeguards and has private API references in it. Use only when you really know what you're doing! | |
// pspdf_swizzleSelectorWithBlock not provided. Use your swizzling helper of choice | |
// (e.g. http://petersteinberger.com/blog/2014/a-story-about-swizzling-the-right-way-and-touch-forwarding/) | |
// Fixes rdar://26295020 | |
static void PSPDFInstallWorkaroundForSheetPresentationIssue26295020(void) { | |
__block auto removeWorkaround = ^{}; | |
const auto installWorkaround = ^{ | |
const SEL presentSEL = @selector(presentViewController:animated:completion:); |
#!/bin/sh | |
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1 | |
enabled=$? | |
if [ "$1" = "off" ]; then | |
if [ $enabled -eq 1 ]; then | |
defaults write com.apple.finder CreateDesktop false | |
osascript -e 'tell application "Finder" to quit' | |
open -a Finder |
import Cocoa | |
import MASShortcut | |
func pow() { | |
let rect = NSScreen.mainScreen()?.frame | |
let window = NSWindow(contentRect: rect!, styleMask: NSBorderlessWindowMask, backing: .Buffered, `defer`: false) | |
window.backgroundColor = NSColor.clearColor() | |
window.opaque = false | |
window.alphaValue = 1 | |
window.makeKeyAndOrderFront(NSApplication.sharedApplication()) |
// We're going to try to build a collectionview layout engine that can serve up cells and supplementary views | |
// in a generic way. I haven't built this all the way to the collection view, and I don't konw what the real | |
// brief is, so there may be lots of gotchas here that don't work as desired, but it scopes out several ways | |
// to get a handle on the problem and how I'd at least probably start. | |
// Ultimately, this requires converting (Model, IndexPath) -> Cell and (Model, IndexPath) -> SupView. I'm | |
// assuming that's the only feature of these factories. |
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300; |