Skip to content

Instantly share code, notes, and snippets.

View luizjr's full-sized avatar
🚀
Working and Learning, React Native and Kubernetes

Luiz Junior luizjr

🚀
Working and Learning, React Native and Kubernetes
View GitHub Profile
@luizjr
luizjr / add_sudoers.adoc
Last active January 25, 2023 16:42
Export / Import Gnome Terminal Profiles
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
@luizjr
luizjr / redis-clear
Created September 10, 2019 03:05 — forked from dimasch/redis-clear
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@luizjr
luizjr / cloudSettings
Last active June 25, 2020 12:39 — forked from diego3g/settings.json
Meu Padrão de Configuração do VSCode
{"lastUpload":"2020-06-25T12:39:15.424Z","extensionVersion":"v3.4.3"}
@luizjr
luizjr / .zshrc
Last active October 12, 2019 05:39 — forked from diego3g/.zshrc
Configuração padrão do ZSH
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export ANDROID_HOME=~/Android/Sdk
export PATH="$PATH:$ANDROID_HOME/tools"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
# Path to your oh-my-zsh installation.
export ZSH="/home/luizjr/.oh-my-zsh"
export PATH="$PATH:/usr/local/bin"
@luizjr
luizjr / RGB.py
Created July 13, 2018 12:52
RGB LED GPIO Raspberry PI3
import random, time
import RPi.GPIO as GPIO
import colorsys
RUNNING = True
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
blue = 16
green = 20
@luizjr
luizjr / install-imapsync.sh
Created May 10, 2018 13:37 — forked from plutocrat/install-imapsync.sh
Install imapsync on Ubuntu 16.04
# Run these manually
# First install git and grab the imapsync code
apt install git
git clone https://github.com/imapsync/imapsync.git
# Install all dependencies
apt install automake build-essential libauthen-ntlm-perl libclass-load-perl libcrypt-openssl-rsa-perl libdata-uniqid-perl libdate-manip-perl libdigest-hmac-perl libdigest-md5-file-perl libdist-checkconflicts-perl libfile-copy-recursive-perl libio-tee-perl libjson-perl libmail-imapclient-perl libmodule-implementation-perl libmodule-runtime-perl libmodule-scandeps-perl libpackage-stash-perl libpackage-stash-xs-perl libpar-packer-perl libreadonly-perl libsys-meminfo-perl libterm-readkey-perl libtest-fatal-perl libtest-mock-guard-perl libtest-mockobject-perl libtest-pod-perl libtest-requires-perl libtry-tiny-perl libunicode-string-perl make makepasswd perl-doc rcs
# These ones didn't exist in my repos, so first try to install through apt
apt-get install libjson-webtoken-perl libjson-webtoken-crypt-rsa-perl
@luizjr
luizjr / 1-react-native-simulator-and-device.md
Created January 17, 2017 19:53 — forked from almost/1-react-native-simulator-and-device.md
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: