Skip to content

Instantly share code, notes, and snippets.

View igorkulman's full-sized avatar

Igor Kulman igorkulman

View GitHub Profile
@objc func saveTapped(sender: AnyObject) {
let db = SomeDatabse()
db.SaveSomeData()
let api = SomeApi()
api.doSomeRequest {
self.updateSomeUI()
}
}
@igorkulman
igorkulman / CompareTools.plist
Last active November 7, 2020 07:06
Visual Studio Code as a merge tool for Git Tower. Place both files to ~/Library/Application Support/com.fournova.Tower2/CompareTools/ and restart Git Tower
<?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>
@igorkulman
igorkulman / svg-convert.sh
Last active May 25, 2023 16:42 — forked from lopis/svg-convert.sh
SVG to PNG convert and resize
#!/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"
class UserCell: UITableViewCell, NibReusable
<div class="disqus-comments">
<button id="show-comments" class="btn btn-default" type="button">Show <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">comments</span></button>
<div id="disqus_thread"></div>
</div>
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!
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)
{
/* home */
"\\UF729" = "moveToBeginningOfLine:";
"$\\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\\UF72B" = "moveToEndOfLine:";
"$\\UF72B" = "moveToEndOfLineAndModifySelection:";
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
sudo update-locale LANG=en_US.UTF8