Skip to the relevant sections if needed.
A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!
This guide was tested on:
- macOS Catalina 10.15.4
- docker desktop 2.2.0.5 (43884) - stable release
- XQuartz 2.7.11 (xorg-server 1.18.4)
- Macbook Pro (Intel)
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 | |
extension UIFont { | |
/// Watch [WWDC Session](https://developer.apple.com/videos/play/wwdc2015/804/). | |
/// [Font Feature Registry](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html) | |
/// - Parameters: | |
/// - size: The size (in points) to which the font is scaled. This value must be greater than 0.0. | |
/// - weight: The weight of the font, specified as a font weight constant. | |
/// - features: Font features supported by SFPro |
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
func animation(from notification: Notification) -> Animation? { | |
guard | |
let info = notification.userInfo, | |
let duration = info[UIResponder.keyboardAnimationDurationUserInfoKey] as? Double, | |
let curveValue = info[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int, | |
let uiKitCurve = UIView.AnimationCurve(rawValue: curveValue) | |
else { | |
return nil | |
} |
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
comma script import ~/lldb/subl.py | |
comma script add -f subl.subl subl |
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
// | |
// SVGPath.swift | |
// SVGPath | |
// | |
// Created by Tim Wood on 1/21/15. | |
// Updated by Vitaly Domnikov 10/6/2015 | |
// Updated by Jason Rodriguez 08/29/2017 | |
// Copyright (c) 2015 Tim Wood, Vitaly Domnikov, Jason Rodriguez. All rights reserved. | |
import Foundation |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
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
// Taken from ACBRadialMenuView Project | |
// BSD 3-Clause License | |
// Copyright (c) 2017, akhilcb (https://github.com/akhilcb) | |
extension CGPoint { | |
static func pointOnCircle(center: CGPoint, radius: CGFloat, angle: CGFloat) -> CGPoint { | |
let x = center.x + radius * cos(angle) | |
let y = center.y + radius * sin(angle) | |
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
#!/usr/bin/env bash | |
# Generates gource video (h.264) out of multiple repositories. | |
# Pass the repositories in command line arguments. | |
# Example: | |
# <this.sh> /path/to/repo1 /path/to/repo2 | |
RESOLUTION="1600x1080" | |
outfile="gource.mp4" | |
i=0 |
NewerOlder