Skip to content

Instantly share code, notes, and snippets.

View jojitoon's full-sized avatar
🏠
Working from home

Jojitoon jojitoon

🏠
Working from home
View GitHub Profile
{
"AF": [
"Badakhshan",
"Badghis",
"Baghlan",
"Balkh",
"Bamyan",
"Daykundi",
"Farah",
"Faryab",
[
{ "code": "AF", "name": "Afghanistan" },
{ "code": "AX", "name": "Åland Islands" },
{ "code": "AL", "name": "Albania" },
{ "code": "DZ", "name": "Algeria" },
{ "code": "AS", "name": "American Samoa" },
{ "code": "AD", "name": "Andorra" },
{ "code": "AO", "name": "Angola" },
{ "code": "AI", "name": "Anguilla" },
{ "code": "AQ", "name": "Antarctica" },
@jojitoon
jojitoon / useRealtime.ts
Last active February 5, 2025 10:16
Firestore snapshot hook
import firestore, {
FirebaseFirestoreTypes,
} from '@react-native-firebase/firestore';
import { useCallback, useEffect, useMemo, useState } from 'react';
type RealtimeState<T> = {
data: T[] | T | undefined;
loading: boolean;
error: Error | null;
@jojitoon
jojitoon / error
Created February 10, 2023 20:59
Error on android build
> Task :app:checkDebugAarMetadata FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
41 actionable tasks: 3 executed, 38 up-to-date
module TemporaryPatch
refine Hash do
def to_s
''
end
end
end
my_ebook = {
ebook: 'Ruby Object Model',
@jojitoon
jojitoon / 01-ubuntu-16.04-setup.md
Created January 22, 2021 11:59 — forked from tomysmile/01-ubuntu-16.04-setup.md
Ubuntu 16.04 Setup in Digital Ocean

Initial Server Setup with Ubuntu 16.04

Update Packages

$ sudo apt-get update

Add Swap

@jojitoon
jojitoon / mac-mongodb-setup.md
Created January 22, 2021 11:59 — forked from tomysmile/mac-mongodb-setup.md
MongoDB Brew installation

Update Homebrew’s package database.

brew update

To install the MongoDB binaries, issue the following command in a system shell:

brew install mongodb
@jojitoon
jojitoon / mac-rabbitmq-setup.md
Created January 22, 2021 11:58 — forked from tomysmile/mac-rabbitmq-setup.md
Install RabbitMQ using Brew

Update Homebrew’s package database.

brew update

To install the MongoDB binaries, issue the following command in a system shell:

brew install rabbitmq
@jojitoon
jojitoon / node-setup-pm2-nginx.md
Created January 22, 2021 11:58 — forked from tomysmile/node-setup-pm2-nginx.md
Setup NodeJS Production with PM2, Nginx in Ubuntu 16.04

How To Set Up a Node.js Application for Production on Ubuntu 16.04

with PM2 & Nginx

Create User

as a root, run below commands on server:

# adduser tomy
@jojitoon
jojitoon / mac-setup-redis.md
Created January 22, 2021 11:58 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis