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
imgBuild="DE" && imgBuildNumer=`git rev-list --count HEAD` && | |
imgPath="SRCDIR/Assets/Images.xcassets/AppIcon.appiconset" && | |
convert "$imgPath/Icon-60@2x(120x120).png" -fill black -pointsize 22 -gravity North -annotate 0 "$imgBuild $imgBuildNumer" "$imgPath/Icon-60@2x(120x120).png" && | |
convert "$imgPath/Icon-60@3x(180x180).png" -fill black -pointsize 26 -gravity North -annotate 0 "$imgBuild $imgBuildNumer" "$imgPath/Icon-60@3x(180x180).png" && | |
convert "$imgPath/Icon-Small@3x(87x87).png" -fill black -pointsize 22 -gravity North -annotate 0 "$imgBuild" "$imgPath/Icon-Small@3x(87x87).png" && | |
convert "$imgPath/Icon-Small@2x(58x58).png" -fill black -pointsize 22 -gravity North -annotate 0 "$imgBuild" "$imgPath/Icon-Small@2x(58x58).png" |
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
fh() { | |
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac --height "40%" | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g') | |
} | |
# and try fh to filter the history with fzf | |
# source: https://armno.in.th/2020/01/16/fzf-history/ |
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
document.querySelectorAll('.links-list .link-content').forEach(el => { | |
console.log(el.querySelector('span').innerText) | |
}) |
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 UIKit | |
struct Todo: Codable { | |
let userId: Int | |
let id: Int | |
let title: String | |
var completed: Bool | |
} | |
var todos = [Todo]() |
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
#if DEBUG | |
class Log { | |
static func d(_ str: String){ | |
print("Log.d: \(str)") | |
} | |
} | |
#else | |
class Log { | |
static func d(_ str: 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
/** | |
* prints the localization key and string requested in log for debugging purpose | |
*/ | |
#if DEBUG | |
public func NSLocalizedString(_ key: String, tableName: String? = nil, bundle: Bundle = Bundle.main, value: String = "", comment: String) -> String | |
{ | |
let str = bundle.localizedString(forKey: key, value: value, table: tableName) | |
debugPrint("DEBUG: \(key) -> \(str)") | |
return str |
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 StrQueue: NSObject { | |
static let shared = StrQueue() | |
let kQueueLength = 3 | |
var strings = [String]() | |
private override init() { } | |
func add(_ str: 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
let obj = YourRealmEntity.sharedSchema() | |
let props = obj?.properties | |
print(props) | |
var csvHeader = [String]() | |
for pid in props as! [RLMProperty]{ | |
// print("type:\(pid.type) name: \(pid.name)") | |
csvHeader.append("\(pid.name)") | |
} | |
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 UIKit | |
print("one") | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { | |
print("two") | |
} | |
print("three") | |
func testactivation(){ |
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
By default, jazzy looks for a file named ".jazzy.yaml" in the source | |
directory and its ancestors. You can override the config file location | |
with --config. | |
(The source directory is the current working directory by default. | |
You can override that with --source-directory.) | |
The config file can be in YAML or JSON format. Available options are: |