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
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
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
struct CameraView: View { | |
@StateObject var model = CameraViewModel() | |
@State var currentZoomFactor: CGFloat = 1.0 | |
var captureButton: some View { | |
Button(action: { | |
model.capturePhoto() | |
}, label: { | |
Circle() |
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 SwiftUI | |
let LINE_LENGTH: Double = 500.0 | |
let N = 720 | |
let LINES = 18 | |
let WAVES: Double = 18.0 | |
let WAVE_HEIGHT: Double = 20 | |
let SPACING: Double = 27.0 | |
let CURL_AMOUNT: Double = 12.0 |
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 | |
class BaseImageView: UIView{ | |
var roundedShape = CAShapeLayer() | |
var curvedPath: UIBezierPath! | |
var shapeColor: UIColor! | |
var circular: Bool! | |
var shadow: Bool! |
Turn your smartphone or tablet (e.g., Iphone, Ipad, Samsung, Motorola, etc) camera into a WebCam to make video conference (e.g., Google Meeting, Zoom, Discord, etc) in Linux.
Examples:
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 SwiftUI | |
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) | |
struct LinkColoredText: View { | |
enum Component { | |
case text(String) | |
case link(String, URL) | |
} |
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
// Image+Trim.swift | |
// | |
// Copyright © 2020 Christopher Zielinski. | |
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
extension UITextView { | |
// Massive credit to Dave Delong for his extensive help with this solution. | |
/// Returns whether or not the `UITextView` is displaying truncated text. This includes text | |
/// that is visually truncated with an ellipsis (...), and text that is simply cut off through | |
/// word wrapping. | |
/// | |
/// - Important: | |
/// This only works properly when the `NSLineBreakMode` is set to `.byTruncatingTail` or `.byWordWrapping`. | |
/// | |
/// - Remark: |
NewerOlder