| Value | Color |
|---|---|
| \e[0;30m | Black |
| \e[0;31m | Red |
| \e[0;32m | Green |
| \e[0;33m | Yellow |
| \e[0;34m | Blue |
| \e[0;35m | Purple |
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 { | |
| enum GlowEffect: Float { | |
| case small = 0.4, normal = 2, big = 15 | |
| } | |
| func pulsate(with duration: Double = 0.2) { | |
| let pulse = CASpringAnimation(keyPath: "transform.scale") | |
| pulse.duration = duration | |
| pulse.fromValue = 0.98 |
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
| private func getAddressString( | |
| addressName: String?, | |
| estLength: Int) -> String { | |
| if var addr = addressName { | |
| addr = "\n\"\(addr)\"" | |
| let len = addr.count - 1 | |
| if len > estLength { | |
| let offset = len/(len/(estLength/2)) | |
| for i in stride(from: 0, to: addr.count, by: offset) { | |
| let iter = i/offset |
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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. Optionally, if you set this to "random" | |
| # it'll load a random theme each time that oh-my-zsh is loaded. | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="robbyrussell" |
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
| int add(int x, int y) | |
| { | |
| if (y == 0) | |
| return x; | |
| else | |
| return add( x ^ y, (x & y) << 1); | |
| } | |
| #define ARRLEN(x) (sizeof (x) / sizeof (*x)) |