In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
override func draw(_ rect: CGRect) { | |
UIColor.white.setFill() | |
let minX: CGFloat = 0 | |
let maxX = rect.width | |
let maxY = rect.height | |
let midX = rect.midX | |
let circleRadius: CGFloat = 45 | |
let roundingRadius: CGFloat = 6 |
// This ensures that the automaticallyAdjustsScrollViewInsets magic works | |
// On our newly added view controller as well. | |
// This triggers _layoutViewController which then triggers | |
// _computeAndApplyScrollContentInsetDeltaForViewController: | |
// which finally updates our content inset of the scroll view (if any) | |
// rdar://19053416 | |
[self.navigationController.view setNeedsLayout]; |
cat /etc/*-release |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
https://drive.google.com/uc?export=view&id= |
https://source.unsplash.com/random/1024x1024 |
#!/bin/bash | |
date 0102030405 | |
open /Applications/Sketch.app | |
ntpdate -u time.apple.com |
// iOS 10.2 APPEARANCE PROXY METHODS | |
// Generated thanks to Matt's gist: https://gist.github.com/mattt/5135521 | |
// UIActivityIndicatorView | |
// ========================== | |
@property (nullable, readwrite, nonatomic, strong) UIColor *color NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; | |
// UIBarButtonItem | |
// ========================== | |
(void)setBackgroundImage:(nullable UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; |