Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
public ObservableCollection<TripExpense> Expenses { get; set; } | |
public ExpensesViewModel() | |
{ | |
Expenses = new ObservableCollection<TripExpense>(); | |
//Subscibe to insert expenses | |
MessagingCenter.Subscribe<TripExpense>(this, "AddNew", (expense) => | |
{ | |
Expenses.Add(expense); |
platform :ios, '9.0' | |
use_frameworks! | |
$rxVersion = '~> 2.2.0' | |
target 'MyProject' do | |
pod 'RxSwift', $rxVersion | |
pod 'RxCocoa', $rxVersion | |
end |
Per http://docs.ansible.com/ansible/playbooks_vault.html you can set an environment variable to use a password file for vault access. We can use this to create an environment variable to hold the password.
Copy vault-env
from this project to ~/bin
. Then add this to your ~/.bashrc
:
export ANSIBLE_VAULT_PASSWORD_FILE=~/bin/vault-env
/** | |
Writes a set of objects in the database. | |
- parameter objects: Array of `Objects` to be stored on the database | |
- parameter configuration: Realm `Configuration` in which the write action will be performed | |
- parameter update: Enabled the custom *update* maintaining existing relationships | |
*/ | |
static func write(objects : [Object], configuration: Realm.Configuration, update: Bool = false) { | |
if let realm = try? Realm(configuration: configuration) { | |
realm.beginWrite() |
- name: Check is rvm installed | |
shell: command -v rvm >/dev/null 2>&1 | |
register: is_rvm_exist | |
ignore_errors: yes | |
- debug: msg="{{ is_rvm_exist.rc }}" # it returns rc 1 | |
- debug: var=is_rvm_exist | |
- name: Check is ls installed | |
shell: command -v ls >/dev/null 2>&1 |
# one or the other, NOT both | |
[url "https://github"] | |
insteadOf = git://github | |
# or | |
[url "[email protected]:"] | |
insteadOf = git://github |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
tree-sitter
. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful.
To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers
Links for tree-sitter
help:
tree-sitter
: the main repotree-sitter-cli
: converts a JavaScript grammar to the required C/C++ filesnode-tree-sitter
: module to use Tree-sitter parsers in NodeJS