Skip to content

Instantly share code, notes, and snippets.

View fromkk's full-sized avatar

Kazuya Ueoka fromkk

View GitHub Profile
//
// ViewController.swift
// TableViewInvalidSample
//
// Created by Kazuya Ueoka on 2020/06/23.
// Copyright © 2020 fromKK. All rights reserved.
//
import UIKit
import UIKit
class HeaderView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
setUp()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
import Foundation
protocol BaseProtocol {}
class CallClass {
class func call<T: BaseProtocol>(with base: T) {
print(String(describing: type(of: self)), #function)
dump(base)
}
#!/bin/sh
function help() {
cat <<EOF
$(basename ${0}) is a tool for upload dsyms for Firebase Crashlytics
Usage:
$(basename ${0}) [dsyms.zip path] [Google-Service.plist path]
$(basename ${0}) [dsyms.zip path] [fabric API Key]
import UIKit
extension UIScrollView {
struct DefaultProperty {
let contentOffset: CGPoint
let contentSize: CGSize
let contentInset: UIEdgeInsets
let zoomScale: CGFloat
}
- 0CFDE9911368DB5DD58C85A2 /* Intents.intentdefinition in Resources */ = {isa = PBXBuildFile; fileRef = E6F5EEDF3669F3AF3EAE813A /* Intents.intentdefinition */; };
+ 4FEAAB6E236B2D6000CF5D03 /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = E6F5EEDF3669F3AF3EAE813A /* Intents.intentdefinition */; };
- 74092FA4352BF42A8CD81BC0 /* Base */ = {isa = PBXFileReference; name = Base; path = Base.lproj/Intents.intentdefinition; sourceTree = "<group>"; };
+ 74092FA4352BF42A8CD81BC0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/Intents.intentdefinition; sourceTree = "<group>"; };
- 0CFDE9911368DB5DD58C85A2 /* Intents.intentdefinition in Resources */,
+ 4FEAAB6E236B2D6000CF5D03 /* Intents.intentdefinition in Sources */,
import Cocoa
extension String {
func toDouble() -> Double {
if hasPrefix("0x") {
let hex = replacingOccurrences(of: "0x", with: "")
let num = Int(hex, radix: 16)!
return Double(num) / 255.0
} else if hasPrefix("0.") || hasPrefix("1.0") {
return Double(self)!
- deploygate--upload-app-bitrise-step:
inputs:
- owner_name: fromkk
- app_path: "$BITRISE_IPA_PATH"
- visibility: public
- api_key: "$DEPLOYGATE_API_KEY"
- script:
inputs:
- content: |-
#!/usr/bin/env bash
settings set target.language swift
@fromkk
fromkk / TimetableTweet.swift
Created September 21, 2018 02:14
Print session list for tweet of #iOSDCRC
import Foundation
extension Date {
func toString(with dateFormat: String) -> String {
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "ja_JP")
dateFormatter.timeZone = TimeZone(identifier: "Asia/Tokyo")
dateFormatter.dateFormat = dateFormat
return dateFormatter.string(from: self)
}