Skip to content

Instantly share code, notes, and snippets.

@crewshin
crewshin / WeekOfEULA.txt
Created December 7, 2023 16:11
WeekOF EULA
End-User License Agreement ("Agreement")
Last updated: December 07, 2023
Please read this End-User License Agreement carefully before clicking the "I Agree" button, downloading or using WeekOf.
Interpretation and Definitions
Interpretation
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
Definitions
@crewshin
crewshin / WeekOfDocs.md
Created December 7, 2023 15:36
WeekOf Documentation

This custom JQL function allows you to replace hard coded date ranges like:

created >= 2023-11-19 AND created <= 2023-11-25 order by created DESC

with:

issue in weekOf("1", "created") order by created DESC for last week. This is relative from today (minus 1 week).

or:

{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "jsonresume-theme-even-crewshin",
"colors": {
"background": ["#191e23"],
"dimmed": ["#23282d"],
"primary": ["#fbfbfc"],
"secondary": ["#9f9f9f"],
"accent": ["#00a0d2"]
@crewshin
crewshin / KeyboardAvoiding.swift
Last active March 21, 2024 13:55
KeyboardAvoiding SwiftUI
import SwiftUI
class KeyboardAvoidingHostingController<Content>: UIHostingController<Content> where Content: View {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
@crewshin
crewshin / SwiftUI-web-image-download.swift
Created June 16, 2019 14:36
SwiftUI web image download
import SDWebImage
// ...
func fetchWeatherImage() -> Image {
let imageFileName = weather.iconUrl ?? "01d"
let uiImageView = UIImageView()
uiImageView.sd_setImage(with: URL(string: "https://path/\(imageFileName).png"), completed: nil)
if let image = uiImageView.image {