Skip to content

Instantly share code, notes, and snippets.

View wwwjsw's full-sized avatar
:octocat:
Working from home since 2019

guilherme wwwjsw

:octocat:
Working from home since 2019
  • Brazil
  • 01:11 (UTC -03:00)
View GitHub Profile
@wwwjsw
wwwjsw / Sync gh-pages + master branches
Created October 5, 2018 20:21 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@wwwjsw
wwwjsw / store-config.js
Last active January 8, 2019 13:04 — forked from jperelli/store-config.js
Reactotron + redux + react-native configuration
import Config from '../Config/DebugConfig'
import Immutable from 'seamless-immutable'
import Reactotron from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux'
import sagaPlugin from 'reactotron-redux-saga'
var store;
if (Config.useReactotron) {
Reactotron
@wwwjsw
wwwjsw / Sagas-redux.md
Created January 9, 2019 19:09
Saga redux sample

redux test

Sample of how to use redux:

Ignite generate reducer

will generate App/Redux/UserRedux.js will generate App/Sagas/UserSagas.js

@wwwjsw
wwwjsw / PageKit.md
Last active February 28, 2019 20:42
most important instructions for PAGEKIT development

PageKit

  • ./pagekit start --server=127.0.0.1:8080 ref. PageKit Source
  • To watch for local LESS asset changes, run gulp watch.
  • To watch for JS module changes, run webpack --watch.
  • To translate application php pagekit translation:fetch.

Project Dependencies

  1. Composer
  2. npm
package com.mastertheboss.rest;
 
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
 
import javax.ws.rs.*;
@wwwjsw
wwwjsw / .gitignore
Last active March 8, 2019 14:50
.gitignore para apps android
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
var options =["teste1","teste2","teste3","teste4"];
<Picker
mode="dropdown"
selectedValue={this.state.selected}
onValueChange={()=>{}}>
{options.map((item, index) => {
return (<Picker.Item label={item} value={index} key={index}/>)
})}
</Picker>
@wwwjsw
wwwjsw / setup.sh
Last active October 14, 2019 20:33 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/henrique/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
apt install openjdk-8-jre-headless
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin

To install it on a Debian based system simply do

# Install latest JDK
sudo apt install openjdk-8-jre-headless 

# install unzip if not installed yet
sudo apt install unzip

# get latest sdk tools - link will change. go to https://developer.android.com/studio/#downloads to get the latest one

cd ~

@wwwjsw
wwwjsw / react-native-offline-bundling-android
Created June 24, 2020 09:06 — forked from erikyuntantyo/react-native-offline-bundling-android
Build react-native offline bundling into android
# create assets folder in the current project
$ mkdir android/app/src/main/assets
# create bundle script
$ 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/
# execute command to run android to create debug apk
$ react-native run-android
# Or change to android folder