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
  • 04:49 (UTC -03:00)
View GitHub Profile
{
"code": 200,
"status": "OK",
"data": {
"ranking": [
{
"taskId": 311,
"taskName": "task gerente",
"description": "task gerente",
"legend": "teste",
{
"code": 200,
"status": "OK",
"data": [
{
"date": "2024-03-03",
"error": true
},
{
"date": "2024-03-04",
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
[
{
"modalidade": "R",
"descricao": "frete rodoviario",
"cep_inicial": "85806750",
"cep_final": "85806750",
"total": "1",
"peso": "",
"tipo_desconto": "F",
"desconto": "10"
[
{
"id": 11,
"nome": "Café do Brasil",
"regiao": "Minas Gerais",
"avaliacao": 95,
"imagem": "https://picsum.photos/id/42/200/200",
"descricao": "Um café encorpado e aromático, produzido nas montanhas de Minas Gerais."
},
{
@wwwjsw
wwwjsw / async-await-fetch-map.js
Created July 22, 2020 02:05 — forked from ericls/async-await-fetch-map.js
async/await with fetch and map
// Use hacker news API as example
async function getData() {
const ids = await (await fetch('https://hacker-news.firebaseio.com/v0/topstories.json')).json()
const data = Promise.all(
ids.map(async (i) => await (await fetch(`https://hacker-news.firebaseio.com/v0/item/${i}.json?print=pretty`)).json())
)
return data
}
getData()
@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

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 / 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
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>