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/sh | |
ECHO='echo ' | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -wv 'main\|develop\|master\|release'); do | |
if ! ( [[ -f "$branch" ]] || [[ -d "$branch" ]] ) && [[ "$(git log $branch --since "3 month ago" | wc -l)" -eq 0 ]]; then | |
if [[ "$DRY_RUN" = "false" ]]; then | |
ECHO="" | |
fi | |
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
echo "Deleting: " + $local_branch_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
const { exec } = require('child_process'); | |
let authorName = "e-sung" // 여기만 각자 깃헙 아이디로 수정!! | |
exec('gh pr list --json "reviews,title,author" --limit 100', (err, stdout, stderr) => { | |
if (err) { | |
console.error(err) | |
} else if (stderr) { | |
console.error(stderr) | |
} else { | |
let PRs = JSON.parse(stdout) |
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 DogStatsView: UIView { | |
@IBOutlet var nameTitleLabel: UILabel! | |
@IBOutlet var nameLabel: UILabel! | |
@IBOutlet var breedTitleLabel: UILabel! | |
@IBOutlet var breedLabel: UILabel! | |
@IBOutlet var ageTitleLabel: UILabel! | |
@IBOutlet var ageLabel: UILabel! | |
@IBOutlet var weightTitleLabel: UILabel! | |
@IBOutlet var weightLabel: UILabel! |
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/zsh | |
diff "Podfile.lock" "Pods/Manifest.lock" > /dev/null | |
if [ $? != 0 ] ; then | |
echo "Pod Install 해야 합니다" | |
else | |
echo "Pod Install 안해도 됩니다" | |
fi |
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 | |
@IBDesignable public class DesignableView: UIView { | |
@IBInspectable public var borderColor: UIColor = UIColor.clear { | |
didSet { | |
layer.borderColor = borderColor.cgColor | |
} | |
} | |
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 | |
import SwiftUI | |
import Foundation | |
import PlaygroundSupport | |
/// 터치 포인트와 원의 중심과의 거리만큼 원이 늘어나도록 하는 뷰 | |
struct ResizableCircle: View { | |
@State var circleRadius:CGFloat = 100 | |
/// 하드코딩된 값을 쓰지 않고, 그냥, View자체의 center 의 CGPoint값을 알아 낼 수 있는 방법이 없을까요? | |
var center: CGPoint = CGPoint(x: 200, y: 200) |
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
@IBDesignable | |
public class CircularProgressView: UIView { | |
@IBInspectable public var progress: Float = 0 { | |
didSet { | |
drawProgress() | |
} | |
} | |
public var lineWidth: CGFloat = 4 { | |
didSet { |
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
public protocol HandOffable { | |
func setUpHandOff(for url: URL?) | |
} | |
extension HandOffable where Self: UIViewController { | |
public func setUpHandOff(for url: URL?) { | |
guard let url = url else { return } | |
guard let activtiyType = Bundle.main.bundleIdentifier else { return } | |
userActivity = NSUserActivity(activityType: activtiyType) | |
userActivity?.isEligibleForHandoff = true |
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
public protocol XibGenerated { | |
func setUpXib() | |
func setUpViews() | |
} | |
extension XibGenerated where Self: UIView { | |
public func setUpXib(bundle: Bundle? = nil) { | |
let viewType = type(of: self) | |
let bundle = bundle ?? Bundle(for: viewType) | |
let nibName = String(describing: viewType) |
NewerOlder