This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc func saveTapped(sender: AnyObject) { | |
let db = SomeDatabse() | |
db.SaveSomeData() | |
let api = SomeApi() | |
api.doSomeRequest { | |
self.updateSomeUI() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>ApplicationIdentifier</key> | |
<string>com.microsoft.VSCode</string> | |
<key>ApplicationName</key> | |
<string>Visual Studio Code</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# I made this script to convert SVG icons for an iOS app into PNG. | |
# The script will create icons in 3 sizes for different screen DPIs. | |
find "$(cd ..; pwd)" . -type f -name "*.svg" | while read f | |
do | |
FILENAME="${f%.*}" | |
echo '---' | |
inkscape -W "$FILENAME.svg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserCell: UITableViewCell, NibReusable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
import RxSwift | |
class SyncStepCell: UITableViewCell { | |
static let reuseIdentifier = "SyncStepCell" | |
@IBOutlet private weak var titleLabel: UILabel! | |
@IBOutlet private weak var activityIndicator: UIActivityIndicatorView! | |
@IBOutlet private weak var checkmarkImage: UIImageView! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numberTextField.reactive.text.bidirectionalBind(to: viewModel.phoneNumber).dispose(in: reactive.bag) | |
numberTextField.reactive.textColor.bind(signal: viewModel.isValid.map({ [unowned self] (isValid) in return isValid ? self.view.tintColor : UIColor.red})).dispose(in: reactive.bag) | |
self.navigationItem.rightBarButtonItem.reactive.isEnabled.bind(signal: viewModel.isValid).dispose(in: reactive.bag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* home */ | |
"\\UF729" = "moveToBeginningOfLine:"; | |
"$\\UF729" = "moveToBeginningOfLineAndModifySelection:"; | |
/* end */ | |
"\\UF72B" = "moveToEndOfLine:"; | |
"$\\UF72B" = "moveToEndOfLineAndModifySelection:"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set curVolume to output volume of (get volume settings) | |
if curVolume >5 96 then | |
set newVolume to curVolume - 5 | |
else | |
set newVolume to 0 | |
end if | |
set volume output volume newVolume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-locale LANG=en_US.UTF8 |
NewerOlder