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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
using Facebook.Unity; | |
using System.Collections.Generic; | |
using Facebook.MiniJSON; | |
public class FBController : MonoBehaviour { | |
Button[] btn = new Button[4]; |
[user] | |
name = Nguyen Trung Cong | |
email = [email protected] | |
[color] | |
ui = true | |
[merge] | |
tool = meld | |
conflictstyle = diff3 | |
[mergetool "mymeld"] | |
cmd = meld --diff $BASE $LOCAL --diff $BASE $REMOTE --diff $LOCAL $MERGED $REMOTE |
https://gist.github.com/evandrix/7058235 |
1. Using realm.executeTransaction instead realm.beginTransaction and realm.commitTransaction because executeTransaction() automatically handles calling realm.cancelTransaction() in case an exception is thrown. | |
//Using retrolambda | |
try(Realm realmInstance = Realm.getDefaultInstance()) { | |
realmInstance.executeTransaction((realm) -> realm.insertOrUpdate(dog)); | |
} | |
2. Close Realm after opening Realm instances | |
3. A tip: you should open your first Realm instance on the UI thread only after the first Activity has been created, just to be safe from context.getFilesDir() == null | |
4. using realmREsults.asObservable() or Observable.just(realm.where(...)).find*() | |
5. Using findAllSorted() instead of findAll.sort() | |
6. Using @Index to speed up |
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
import UIKit | |
import MessageUI // Import MessageUI | |
// Add the delegate protocol | |
class ViewController: UIViewController, MFMessageComposeViewControllerDelegate { | |
// Send a message | |
func sendMessage() { | |
let messageVC = MFMessageComposeViewController() | |
messageVC.body = "Message String" |
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; | |
var deburredLetters = { | |
// Latin-1 Supplement block. | |
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', | |
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', | |
'\xc7': 'C', '\xe7': 'c', | |
'\xd0': 'D', '\xf0': 'd', | |
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', | |
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', | |
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', |
# Need to do the following steps: | |
# 1. create /var/prometheus first. | |
# 2. run: docker-compose run promdash ./bin/rake db:migrate | |
nodeexporter: | |
image: prom/node-exporter | |
ports: | |
- "9100:9100" | |
prometheus: | |
image: prom/prometheus |
SELECT | |
*, | |
(SELECT json_build_object('id', ref.user_id, 'email', ref.email) | |
FROM user_profile_with_referal ref | |
WHERE customer_id = 84061) AS referal_info | |
FROM user_profile_full | |
WHERE user_id = 84061; |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt