- Connect device via usb
- Run
adb tcpip 5555
- Check the device by going on settings > wifi > ellipsis button on the top right corner > advanced
- Run
adb connect ###.###.#.##
- (Optional) remove the usb cable
- On the React Native app, shake the device to open the dev menu and go into
Dev Settings
- Click on
Debug server host & port for device
- Input the ip from your computer and the port
8081
, like this###.###.#.##:8081
- Enjoy your development wihtout any cables :D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function star-command { | |
if [ "$1" == "" ] || [ "$1" == "-h" ]; then | |
echo "star-command \"command to store on your favorites\"" | |
echo "star-command -l \"list your favorites\"" | |
elif [ "$1" == "-l" ]; then | |
cat ~/.star-commands | |
else | |
echo "$1" >> ~/.star-commands |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sourceables | |
SOURCEABLE_DIR=/home/erick/sourceable/ | |
DIRS=($(ls $SOURCEABLE_DIR)) | |
for dir in "${DIRS[@]}"; do | |
if [[ "$dir" != *.ignore ]] | |
then | |
source "$SOURCEABLE_DIR$dir" | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ControllerAdapter(left, right, up, down) | |
local controller = { | |
l = left; | |
r = right; | |
u = up; | |
d = down | |
} | |
function controller:left() | |
return love.keyboard.isDown(self.l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For many reason tablespace location should be on the partition root | |
sudo mkdir /root_of_fs/pgfoo | |
sudo chown postgres: /root_of_fs/pgfoo | |
CREATE TABLESPACE foo LOCATION '/root_of_fs/pgfoo'; | |
ALTER DATABASE my_db TABLESPACE foo; | |
CREATE DATABASE my_db TABLESPACE foo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FOLDER=$1 | |
REMOTE=$2 | |
if [ "$2" = "" ] | |
then | |
REMOTE="origin" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void trustSelfSignedCertificates() { | |
try { | |
// Create a trust manager that does not validate certificate chains | |
TrustManager[] trustAllCerts = new TrustManager[] { | |
new X509TrustManager() { | |
public java.security.cert.X509Certificate[] getAcceptedIssuers() { | |
return new X509Certificate[0]; | |
} | |
public void checkClientTrusted( | |
java.security.cert.X509Certificate[] certs, String authType) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var existingAngular = window.angular; | |
require("angular"); | |
var angular = window.angular; | |
window.angular = existingAngular || {}; | |
module.exports = angular; | |
})(); |
NewerOlder