-
Keeping a private key in a keychain is a great way to secure it. The key data is encrypted on disk and accessible only to your app or the apps you authorize. However, to use the key, you must briefly copy a plain-text version of it into system memory. While this presents a reasonably small attack surface, there’s still the chance that if your app is compromised, the key could also become compromised. As an added layer of protection, you can protect a private key using the Secure Enclave. >
This file contains hidden or 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 UIView { | |
func calculatePreferredHeight(preferredWidth: CGFloat? = nil) -> CGFloat { | |
let width = preferredWidth ?? frame.width | |
let widthConstraint = NSLayoutConstraint.constraintsWithVisualFormat("H:[view(==\(width)@999)]", options: .allZeros, metrics: nil, views: ["view": self]) | |
addConstraints(contraint) | |
let height = systemLayoutSizeFittingSize(UILayoutFittingCompressedSize).height | |
removeConstraints(constraint) | |
return height | |
} | |
} |
This file contains hidden or 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
"fundamental constants of human-computer interaction", which can be split into the human and computer halves. | |
Very roughly: | |
~16 ms – frame budget for interactive animation | |
100 ms – user action feels instantaneous | |
200 ms – typical human reaction time | |
500+ ms – perceptible delay | |
3+ seconds – perceived sluggishness | |
10+ seconds – attention span is broken |
This file contains hidden or 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
Verifying myself: My Bitcoin username is +tk. https://onename.io/tk |
I hereby claim:
- I am tkersey on github.
- I am twk (https://keybase.io/twk) on keybase.
- I have a public key whose fingerprint is 53D0 44AE 9245 5BF9 ACB4 7ACF ACBE D759 C16F 62B7
To claim this, I am signing this object:
found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on
Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband
- Unplug coax cable from Motorola
- Hold down the white reset button on the back panel with a pen for 30s. This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
- When modem is back on plug in a computer with an Ethernet cable into the modem.
- Connect to http://192.168.0.1 and login with “admin” / “motorola”
- Now you will make some changes:
- Wireless -> Primary Network -> Disabled
This file contains hidden or 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
|ψ> = α|0> β|1> |
This file contains hidden or 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
http://stackoverflow.com/questions/927358/git-undo-last-commit | |
Undo a commit and redo | |
$ git commit ... | |
$ git reset --soft HEAD^ (1) | |
$ edit (2) | |
$ git commit -a -c ORIG_HEAD (3) | |
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset". |
This file contains hidden or 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
Remove file from git repository (history) | |
SOLUTION: This is the shortest way to get rid of the files: | |
1. check .git/packed-refs - my problem was that I had there a refs/remotes/origin/master line for a remote repository, delete it, otherwise git won't remove those files | |
2. (optional) git verify-pack -v .git/objects/pack/#{pack-name}.idx | sort -k 3 -n | tail -5 - to check for the largest files | |
3. (optional) git rev-list --objects --all | grep #{SHA_FROM_#_3} - to check what files those are |
NewerOlder