Commands to get commit statistics for a Git repository from the command line -
using git log
, git shortlog
and friends.
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 Foundation | |
func toRoman(number: Int) -> String { | |
guard number < 1000 else { fatalError("Number must be less than 1000") } | |
let romanValues = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] | |
let arabicValues = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] | |
var romanValue = "" |
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
// 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; |
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
- lay bai hat lien quan: | |
http://mp3.zing.vn/xhr/recommend?type=audio&id=ZW67OIA0 | |
- lay du lieu thong qua key: | |
http://mp3.zing.vn/xhr/media/get-source?type=audio&key=kmJHTZHNCVaSmSuymyFHLH | |
http://mp3.zing.vn/html5xml/song-xml/kmJHTZHNCVaSmSuymyFHLH | |
- tim bai hat: | |
http://ac.mp3.zing.vn/complete?type=artist,song,key,code&num=500&query=Anh Thế Giới Và Em |
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
# 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 | |
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
// 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]; |