I hereby claim:
- I am aoenth on github.
- I am aoenth (https://keybase.io/aoenth) on keybase.
- I have a public key ASBy72mdXHPP8Kms3bwda6usSxk36YLJDUHMzcyUvhBm8Qo
To claim this, I am signing this object:
| ; You’ve configured Vim to use expression-based folding (foldmethod=expr) with two custom functions: | |
| ; • ClassFoldExpr() → decides where folds start and end (fold structure). | |
| ; • ClassFoldText() → decides how folded text is displayed (fold summary). | |
| ; | |
| ; This lets Vim fold your custom language in a hierarchical way: | |
| ; • Level 1 → folds whole classes (classname { ... }) | |
| ; • Level 2 → folds functions inside classes (functionname { ... }) | |
| set foldmethod=expr |
| import Foundation | |
| func find(word: String, in arr: [[Character]]) -> Bool { | |
| let word = Array(word) | |
| var index = 0 | |
| func check(x: Int, y: Int) -> Bool { | |
| // check bounds | |
| guard x >= 0, |
| " Plugged | |
| call plug#begin("~/.config/nvim/plugged") | |
| Plug 'morhetz/gruvbox' | |
| Plug 'preservim/nerdtree' | |
| Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| Plug 'ryanoasis/vim-devicons' | |
| Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
| Plug 'junegunn/fzf.vim' | |
| Plug 'itchyny/lightline.vim' |
| import UIKit | |
| class TestViewController: UIViewController { | |
| let stackView: UIStackView = { | |
| let stackView = UIStackView() | |
| stackView.translatesAutoresizingMaskIntoConstraints = false | |
| stackView.axis = .vertical | |
| stackView.spacing = 16 | |
| return stackView |
I hereby claim:
To claim this, I am signing this object:
| import UIKit | |
| extension UIColor { | |
| convenience init(hex: Int) { | |
| let red = CGFloat((hex & 0xFF0000) >> (4 * 4))/0xFF | |
| let green = CGFloat((hex & 0x00FF00) >> (4 * 2))/0xFF | |
| let blue = CGFloat(hex & 0x0000FF)/0xFF | |
| self.init(red: red, green: green, blue: blue, alpha: 1) | |
| } | |
| } |
| extension UIColor { | |
| static func colorForPercent(_ percentage: Double) -> UIColor { | |
| switch percentage { | |
| case 0...0.5: | |
| return firstHalf(percentage: percentage * 2) | |
| case 0.5...1: | |
| return secondHalf(percentage: (percentage - 0.5) * 2) | |
| default: | |
| fatalError("Bad Input: percentage must satisfy 0 <= percentage <= 1") | |
| } |
| static func colorForPercent(_ percentage: Double) -> UIColor { | |
| switch percentage { | |
| case 0..<0.33: | |
| return UIColor(hex: 0xE02020) | |
| case 0.33..<0.66: | |
| return UIColor(hex: 0xFA6400) | |
| case 0.66..<1: | |
| return UIColor(hex: 0xF7B500) | |
| case 1: | |
| return UIColor(hex: 0x6DD400) |
| let anotherDate = normalDate(fromYear: 1991, month: 1, day: 20) | |
| let anotherZodiac = zodiacFrom(date: anotherDate) | |
| print(anotherZodiac) |
| let date = normalDate(fromYear: 1991, month: 6, day: 22) | |
| let zodiac = zodiacFrom(date: date) | |
| print(zodiac) |