Elm uses the functional reactive programming style and purely functional graphical layout to
build user interface without any destructive updates. It enforces a “model view update”
architecture, where the update has the following signature: (action, state) -> state
View resetXcode.sh
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
open /Applications/Xcode.app |
View conf_terminal.txt
https://tonyxu.io/posts/2018/ultimate-way-to-beautify-mac-terminal-and-recommendations-for-plugins/ |
View subscript.swift
//: Playground - noun: a place where people can play | |
//Subscript: shortcut for accessing the member elements in a collection, list, or sequence. | |
import UIKit | |
//#1 | |
struct TimesTable { | |
let multiplier: Int | |
subscript(index: Int) -> Int { | |
return multiplier * index |
View elm-swift-redux.mkd
View TableDataSource.mkd
import UIKit
/// This class is a simple, immutable, declarative data source for UITableView
final class TableDataSource<V, T> : NSObject, UITableViewDataSource where V: UITableViewCell {
typealias CellConfiguration = (V, T) -> V
private let models: [T]
private let configureCell: CellConfiguration
View Emoji-markdown.md
People
![]() :bowtie: |
:smile: |
:laughing: |
---|---|---|
:blush: |
:smiley: |
:relaxed: |
:smirk: |
:heart_eyes: |
:kissing_heart: |
:kissing_closed_eyes: |
:flushed: |
:relieved: |
:satisfied: |
:grin: |
:wink: |
:stuck_out_tongue_winking_eye: |
:stuck_out_tongue_closed_eyes: |
:grinning: |
:kissing: |
:kissing_smiling_eyes: |
:stuck_out_tongue: |
View printing-log-swift.swift
import Foundation | |
public struct Log | |
{ | |
public static var isEnabled = true | |
public static func debug(_ m: @autoclosure ()->String, _ file: Any? = #file, _ f: String = #function, _ line: UInt = #line) { | |
print(m(), file ?? "", f, line) | |
} |
View set_permission_ios_for_UI_test.mkd
brew tap wix/brew
This line is for GNU instalation, because old syntaxis uses POSIX and to run new scripts is necessary to use GNU
brew install gnu-sed grep --with-default-names
Update new commands for mac that uses GNU
brew install bash
chsh -s /usr/local/bin/bash
View insetsForLabel.m
#import "RLInsetsLabel.h" | |
#import "UIView+Utils.h" | |
@implementation RLInsetsLabel | |
- (void)awakeFromNib { | |
[super awakeFromNib]; | |
self.edgeInsets = UIEdgeInsetsMake(self.topEdge, self.leftEdge, self.bottomEdge, self.rightEdge); | |
} | |
- (id)initWithFrame:(CGRect)frame { |
NewerOlder