Install the OpenSSL on Debian based systems
sudo apt-get install openssl| import UIKit | |
| import Foundation | |
| @IBDesignable class PlaceholderTextView: UITextView, UITextViewDelegate | |
| { | |
| private let _placeholderColor: UIColor = UIColor(white: 0.78, alpha: 1) | |
| private var _placeholderLabel: UILabel! | |
| @IBInspectable var placeholder: String = "" { | |
| didSet { |
| override var intrinsicContentSize: CGSize { | |
| let parentSize = super.intrinsicContentSize | |
| //calculate min size, to prevent changing width of field lower than this | |
| var minSize = (String(repeating: "0", count: maxLength) as NSString).size(attributes: [NSFontAttributeName: font as Any]) | |
| minSize.height = parentSize.height | |
| if isEditing { | |
| if let text = text, | |
| !text.isEmpty { | |
| // Convert to NSString to use size(attributes:) |
| deinit { | |
| NotificationCenter.default.removeObserver(self) | |
| } | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), name: .UIKeyboardWillShow, object: nil) | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: .UIKeyboardWillHide, object: nil) | |
| } | |
| func keyboardWillShow(notification: NSNotification) { |
| import UIKit | |
| extension UIView { | |
| // In order to create computed properties for extensions, we need a key to | |
| // store and access the stored property | |
| fileprivate struct AssociatedObjectKeys { | |
| static var tapGestureRecognizer = "MediaViewerAssociatedObjectKey_mediaViewer" | |
| } | |
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.
The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.
When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].
When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.
How to configure SSL for FileBeat and Logstash step by step with OpenSSL (Create CA, CSRs, Certificates, etc).
The Elasticsearch documentation "Securing Communication With Logstash by Using SSL" does not show how to create with openssl the necessary keys and certificates to have the mutual authentication between FileBeat (output) and Logstash (input). It is not a difficult task but it can be very tedious if you are not familiar with the use of openssl.
These are some errors that can be found in the FileBeat and Logstash logs when SSL is not properly configured.
# FileBeat.
git clone [email protected]: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