Given these two tables
lists
id | name | weight |
---|---|---|
1 | Groceries | 0 |
2 | Pharmacy | 1 |
3 | Misc | 2 |
extension UITabBarController { | |
/** | |
Show or hide the tab bar. | |
- Parameter hidden: `true` if the bar should be hidden. | |
- Parameter animated: `true` if the action should be animated. | |
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation | |
along side with. For example during a push on a `UINavigationController`. | |
*/ |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
/* | |
Usage: | |
Store( | |
initialState: .init(), | |
reducer: UserRecipesListReducer().relay { [unowned self] featureAction in | |
// Handle action here | |
} | |
) | |
*/ |
/* | |
Example usage: | |
confirmationDialog( | |
store: store.scope(state: \.destination, action: UserRecipesListReducer.Action.destination), | |
state: /UserRecipesListReducer.Destination.State.confirmation, | |
action: UserRecipesListReducer.Destination.Action.confirmation | |
).store(in: &subscriptions) | |
alert( |
// | |
// debounce-throttle.swift | |
// | |
// Created by Simon Ljungberg on 19/12/16. | |
// License: MIT | |
// | |
import Foundation | |
extension TimeInterval { |
import CloudKit | |
import Combine | |
/// A publisher that wraps a `CKFetchRecordZoneChangesOperation` and emits events as the operation completes. | |
/// | |
/// The `FetchRecordZoneChangesPublisher` fetches changes from the given record zones. New and deleted records are | |
/// posted individually via the `.recordChanged` and `.recordDeleted` actions. | |
/// | |
/// Errors are automatically retried if possible. Resetting the change token in case it expired is also automatically | |
/// handled. Because emitting errors fails a publisher all errors are posted as actions. There may still be running |
// | |
// UNNotification+Reschedule.swift | |
// Meal Plan | |
// | |
// Created by Simon Ljungberg on 17/11/16. | |
// License: MIT | |
// | |
import UIKit | |
import UserNotifications |
// MIT License applies. | |
import UIKit | |
/** | |
A `UILabel` subclass that provides a way of adding padding to the label. | |
*/ | |
open class Label: UILabel { | |
/// The amount of padding for each side in the label. |
Given these two tables
lists
id | name | weight |
---|---|---|
1 | Groceries | 0 |
2 | Pharmacy | 1 |
3 | Misc | 2 |
<?php | |
/** | |
* @file | |
* Helper class for encoding images as Base64. | |
* Has support for the Drupal module ImageCache, just provide it with your | |
* preset name if you'd like the class to use that version of an image instead. | |
* Is by no means dependent on Drupal though. Just a nice feature. | |
* Feel free to use it as you like. | |
* | |
* @author Simon Ljungberg <simon@nimnim.se> |