Skip to content

Instantly share code, notes, and snippets.

View anhtuank7c's full-sized avatar
🎯
Focusing

Tuan Nguyen anhtuank7c

🎯
Focusing
View GitHub Profile
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Debug/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_STAGING=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Staging/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Release/${GOOGLESERVICE_INFO_PLIST}
# Make sure the dev version of GoogleService-Info.plist exists
@anhtuank7c
anhtuank7c / Podfile
Created May 31, 2017 11:26
Cài đặt react-native-maps
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'demo' do
# Fixes required for pod specs to work with rn 0.42
react_native_path = "../node_modules/react-native"
pod "Yoga", :path => "#{react_native_path}/ReactCommon/yoga"
pod "React", :path => react_native_path
@anhtuank7c
anhtuank7c / CoroutinesConcurence.kt
Created February 8, 2020 11:13
Coroutines concurence query multiple firestore document in Kotlin
private fun showMultiStableInfo(stableKeys: Set<Any?>) {
val scope = CoroutineScope(Dispatchers.Default)
scope.launch {
var stables = arrayListOf<Stable>()
stableKeys.forEach { key ->
key?.let { stableID ->
val job = CoroutineScope(Dispatchers.Default).async {
suspendCoroutine<Stable?> { cont ->
myRef.child("stables").child(stableID as String).addListenerForSingleValueEvent(object : ValueEventListener {
@anhtuank7c
anhtuank7c / app.php
Last active November 19, 2019 17:33
CakePHP RedisEngine configure
<?php
return [
/**
* Debug Level:
*
* Production Mode:
* false: No error messages, errors, or warnings shown.
*
* Development Mode:
* true: Errors and warnings shown.
@anhtuank7c
anhtuank7c / goto-sublime
Created November 12, 2019 09:32 — forked from kendellfab/goto-sublime
Add mouse click `goto definition` in sublime text 3.
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@anhtuank7c
anhtuank7c / Fastfile
Created January 2, 2019 09:17 — forked from JagCesar/Fastfile
Cookin Fastfile
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@anhtuank7c
anhtuank7c / setup_firebase.sh
Created December 12, 2018 05:41
Setup Firebase Environment GoogleService-Info.plist
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Debug/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_STAGING=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Staging/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Release/${GOOGLESERVICE_INFO_PLIST}
# Make sure the dev version of GoogleService-Info.plist exists
@anhtuank7c
anhtuank7c / .eslintrc
Created September 14, 2018 16:17 — forked from radiovisual/.eslintrc
React Native AirBnB ESLint Config
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true