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
  • 05:39 (UTC -12:00)
View GitHub Profile
@arnoldc
arnoldc / foo.tsx
Last active April 14, 2024 07:18
[React Native] Reanimated.tips
// TIP 1
// - Using the useSharedValue hook
// - Using the useAnimatedStyle hook
const AnimatedComponents = () => {
const buttonPressed = () => {
// Toggle the animation state based on button press
isAnimating.value = !isAnimating.value;
};
@arnoldc
arnoldc / foo.txt
Last active April 3, 2024 18:59
[Android] JDK Enviroment
// To list all installed JDK versions
/usr/libexec/java_home -V
// To set default JDK version
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
// To set specific JDK version (if need specific)
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_131`
@arnoldc
arnoldc / test.txt
Created February 20, 2024 18:47
test
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
@arnoldc
arnoldc / foo.txt
Last active April 5, 2024 14:28
[React Native] debugging
Trigger menu for android emulator
- adb shell input keyevent 82
- or command m
index.android.bundle issue
- mkdir android/app/src/main/assets
- npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
@arnoldc
arnoldc / foo.txt
Last active December 15, 2023 11:43
[Bashscript] General Tips
1. Command to add to recognize the file type
#!/bin/bash
use .sh extension
########################################
@arnoldc
arnoldc / foo.tsx
Last active November 26, 2023 09:59
[React Native] react-native-reanimated tips
// Using => useSharedValue + useAnimatedStyle + withTiming
// this is a shared value that be used between UI and JS thread
// example (example is like an accordion)
export default function ExpandingTextBox() {
// creating shared value via useSharedValue
const boxHeight = useSharedValue(150);
// creating worklet via useAnimatedStyle, and incorporating the withTiming method
@arnoldc
arnoldc / foo.md
Created November 12, 2023 11:10
[React Native] Pod tips

pod outdated

@arnoldc
arnoldc / foo.md
Last active January 4, 2024 10:25
[React Native] Expo cli tips

expo upgrade ___

npx expo install --fix

npx expo install --check

@arnoldc
arnoldc / foo.md
Last active November 10, 2023 03:06
[React Native] cli tips

npx react-native info

@arnoldc
arnoldc / foo.txt
Last active February 6, 2024 16:21
[Android] Running Emulator with certain DNS server
# Settings DNS server for emulator
emulator -avd Pixel_5_API_31 -dns-server 8.8.8.8
# Lock and Unlock
SLEEP = adb shell input keyevent 223
WAKE UP = adb shell input keyevent 224