Skip to content

Instantly share code, notes, and snippets.

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

Arnold Camas arnoldc

🏠
Working from home
  • Philippines
  • 17:28 (UTC -12:00)
View GitHub Profile
@arnoldc
arnoldc / foo.tsx
Last active February 19, 2023 08:27
[React Native] Swipeable
// Swipeable 1 - Quick implementation
// file 2
export default function Swipeable({ onSwipe, name }) {
function onScroll(e) {
e.nativeEvent.contentOffset.x === 200 && onSwipe();
@arnoldc
arnoldc / foo.tsx
Last active February 19, 2023 07:47
[React Native] Buttons
// Different Type of Buttons
/*
- TouchableOpacity - can configure the opacity reduction by setting `activeOpacity`.
- TouchableHighlight - like ":visited" in CSS. can configur `underlayColor` and `activeOpacity`.
- TouchableWithoutFeedback
- TouchableNativeFeedback -> Android only has ripple effect
*/
@arnoldc
arnoldc / foo.js
Last active January 23, 2023 17:54
[React] Redux Toolkit (new)
// #1 - making use of useSelector hook
import { useSelector } from "react-redux";
const { likedImages } = useSelector((state) => state.likedImages);
const [imageList, setImageList] = useState([]);
useEffect(() => {
@arnoldc
arnoldc / foo.tsx
Created January 22, 2023 13:15
[React Native] Add Button in middle of tab navigation
import "react-native-gesture-handler";
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Feed } from "./Feed";
import { Profile } from "./Profile";
import { Favorites } from "./Favorites";
import { AddPost } from "./AddPost";
import Ionicons from "@expo/vector-icons/Ionicons";
import { colors } from "../styles/colors";
import { View } from "react-native";
@arnoldc
arnoldc / foo.txt
Last active January 22, 2023 06:40
[Work] Hay
1. Sending new builds
Build
- iOS:
- Android:
Changes in the latest version:
- Added support for the new 3D Touch feature on iPhone 6s and iPhone 6s Plus
@arnoldc
arnoldc / foo.txt
Last active January 28, 2023 11:38
[vscode] General Tips
1. Q/A in vscode
do similar pattern below
e.g
// q: how to disable auto save?
@arnoldc
arnoldc / foo.tsx
Last active August 14, 2023 23:54
[Typescript] General Tips
/*
* ──────────── Table of contents ────────────
*
* @1 - object as type
* @2 - enums
* @3 - is
* @4 - satisfies
* @5 - optional props
* @6 - types vs interface
* ──────────── Table of contents ────────────
@arnoldc
arnoldc / foo.txt
Last active May 26, 2025 07:10
[Android] Common gradle task
// lint the code
./gradlew lintVitalRelease
// create a release build
./gradlew :app:assembleRelease
@arnoldc
arnoldc / foo.txt
Last active January 27, 2026 11:26
[Android] Check certificate fingerprint
// check keystore certificates fingerprint
keytool -list -v -keystore keystore.jks
// check signature of .apk or .aab
jarsigner -verify -verbose -certs app-release.apk
jarsigner -verify -verbose -certs app-release.aab
@arnoldc
arnoldc / foo.txt
Created August 31, 2022 04:11
[React Native] Android logcat
# kill multiple devices
adb -s emulator-5554 shell
# log specific app