Skip to content

Instantly share code, notes, and snippets.

View mayconmesquita's full-sized avatar

Maycon Mesquita mayconmesquita

View GitHub Profile
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 3, 2024 12:19
Building a react native app in WSL2
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active April 11, 2024 09:39
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@almost
almost / 1-react-native-simulator-and-device.md
Last active November 17, 2022 14:05
Test React Native on the simulator and on a device without editing the code each time!

In the default React Native app scaffolding you have to edit AppDelegate.m to change where it loads the code if you want to test on your device. I use the following snippet to detect if it's being compiled for Debug or Production and for the Simulator or a device. For Production it uses a copy of the code included in the bundle, for Debug on the simualtor it loads from a server on localhost and for Debug on a device it loads from a server on a given IP address.

NOTE: You need to edit YOUR-IP-HERE and change it to the IP to load the code from when in Debug mode on a device. You could use a service like ngrok to make this work from anywhere.

  NSURL *jsCodeLocation;

  // Loading JavaScript code
  #if DEBUG
    // For Debug build load from development server. Start the server from the repository root:
@ghalimi
ghalimi / NPER.js
Created January 23, 2013 23:13
NPER Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
function NPER(rate, payment, present, future, type) {
// Initialize type
var type = (typeof type === 'undefined') ? 0 : type;
// Initialize future value
var future = (typeof future === 'undefined') ? 0 : future;
// Evaluate rate and periods (TODO: replace with secure expression evaluator)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname