Skip to content

Instantly share code, notes, and snippets.

View yuhao-git-star's full-sized avatar
🌏

yuhao yuhao-git-star

🌏
  • San Francisco
View GitHub Profile
let timeLabel : UILabel = {
let label = UIlabel()
label.text = "hi"
return label
}()
import UIKit
class CircleView : UIView {
override func draw(_ rect: CGRect) {
}
}
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
畫筆.addLine(to: CGPoint(x: 100, y: 100))
畫筆.stroke()
}
}
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
// 畫筆.addLine(to: CGPoint(x: 100, y: 100))
// x^2 + y^2 = r^2
import UIKit
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
// 畫筆.addLine(to: CGPoint(x: 100, y: 100))
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
// 畫筆.addLine(to: CGPoint(x: 100, y: 100))
// x^2 + y^2 = r^2
class CircleView : UIView {
override func draw(_ rect: CGRect) {
let 畫筆 = UIBezierPath()
畫筆.move(to: .zero)
// 畫筆.addLine(to: CGPoint(x: 100, y: 100))
// x^2 + y^2 = r^2
@yuhao-git-star
yuhao-git-star / download.js
Created January 30, 2019 07:36 — forked from gregbarcza/download.js
Download all image from cloudinary
'use strict'
const cloudinary = require('cloudinary')
const Promise = require('bluebird')
const co = require('co')
const fs = Promise.promisifyAll(require('fs'))
const request = require('request')
const moment = require('moment')
// FILL THIS
cloudinary.config({
cloud_name: '',
@yuhao-git-star
yuhao-git-star / Fastfile
Created July 19, 2019 13:21 — forked from rodydavis/Fastfile
Top-level Fastfile for Flutter
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
import Foundation
import SwiftUI
struct GradientCircle: View {
var body: some View {
let color1 = Color.init(red: 81/255, green: 204/255, blue: 159/255)
let color2 = Color.init(red: 154/255, green: 255/255, blue: 248/255)
let spectrum = Gradient(colors: [ color1, color2])
let conic =
LinearGradient(gradient: spectrum, startPoint: UnitPoint(x: 0, y: 0.5), endPoint: UnitPoint(x: 0.5, y: 1))