git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #!/bin/bash | |
| # Creates DISK0.tree, DISK1.tree, DISKx.tree inside each disk, with the output of tree command. | |
| # After generating the report, it send via email using mail. | |
| # To add more disks, just add DISK[x]=/full/path to the disk. Just make sure that the array index are sequencial. | |
| # Why this? | |
| # With the reports from tree, in case of disk failure, you will know which file got lost and you can recover them, downloading or via backups. | |
| # GIST: https://gist.github.com/rafaelbiriba/0ee7ca2baec1ef80a878c825295f09e1 | |
| EMAIL_ADDRESS="" # EMAIL_ADDRESS="email@gmail.com" or leave it blank "" to disable email | |
| DISKS[0]="/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_ABC123-part1" |
| import UIKit | |
| class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { | |
| @IBOutlet weak var tableView: UITableView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| NSLayoutConstraint.activate([ | |
| tableView.topAnchor.constraint(equalTo: view.topAnchor), |
| #!/bin/bash -e | |
| # | |
| # Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
| # Adapted to work with the official image available into Mac App Store | |
| # | |
| # Enjoy! | |
| SOURCE_APP="$1" | |
| DEST_IMAGE="$2" | |
| if ! [ -d "$SOURCE_APP" ]; then |
| #!/bin/bash | |
| # tested for Yosemite, ElCapitan and Sierra | |
| print_usage () { | |
| echo "usage: ${0} path_to_app" | |
| exit -1; | |
| } | |
| if [ $# -ne 1 ]; then |
| import UIKit | |
| func singlePixelLine(at y: CGFloat, in rect: CGRect, topBias: Bool = true) { | |
| let offset = pixelUnit/2.0 | |
| let adjustedY = round(from: y - offset, fraction: pixelUnit, down: topBias) + offset | |
| let line = makeLine(at: adjustedY, in: rect) | |
| strokePath(line, width: pixelUnit) | |
| } | |
| #!/bin/bash | |
| # | |
| # Fool'n'Lazy-Proof iOS .crash Symbolication | |
| # | |
| # Just run this script on a folder with your `.ipa`, the corresponding `.dSYM`, | |
| # and (1+) `.crash` files. Will output symbolicated `sym-*.crash`es for you. | |
| # | |
| # Copyright (c) 2016 Ferran Poveda (@fbeeper) | |
| # Provided under MIT License (MIT): http://choosealicense.com/licenses/mit/ |
| import UIKit | |
| class AsyncOperation : NSOperation{ | |
| enum State{ | |
| case Waiting, Executing, Finished | |
| } | |
| import Foundation | |
| /// An abstract class that makes building simple asynchronous operations easy. | |
| /// Subclasses must implement `execute()` to perform any work and call | |
| /// `finish()` when they are done. All `NSOperation` work will be handled | |
| /// automatically. | |
| open class AsynchronousOperation: Operation { | |
| // MARK: - Properties |
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |