Tendo o Node.js instalado em sua máquina:
npm install -g expo-cli
npx create-expo-app meu-app
depois acessar a pasta do novo projeto criado, ex:
| { | |
| "editor.acceptSuggestionOnEnter": "on", | |
| "editor.bracketPairColorization.enabled": true, | |
| "editor.cursorBlinking": "smooth", | |
| "editor.cursorSmoothCaretAnimation": "on", | |
| "editor.defaultFormatter": "esbenp.prettier-vscode", | |
| "editor.fontFamily": "JetBrains Mono", | |
| "editor.fontLigatures": true, | |
| "editor.fontSize": 18, | |
| "editor.formatOnPaste": false, |
| import { StatusBar } from "expo-status-bar"; | |
| import { StyleSheet, SafeAreaView, ScrollView, View, Text } from "react-native"; | |
| import { Provider as PaperProvider, Button } from "react-native-paper"; | |
| import KittenCard from "./components/KittenCard"; | |
| export default function App() { | |
| return ( | |
| <PaperProvider> | |
| <StatusBar style="auto" translucent={false} /> |
Tendo o Node.js instalado em sua máquina:
npm install -g expo-cli
npx create-expo-app meu-app
depois acessar a pasta do novo projeto criado, ex:
| // code by @spencercarli | |
| import React from 'react'; | |
| import { StyleSheet, Text, View, FlatList, Dimensions } from 'react-native'; | |
| const data = [ | |
| { key: 'A' }, { key: 'B' }, { key: 'C' }, { key: 'D' }, { key: 'E' }, { key: 'F' }, { key: 'G' }, { key: 'H' }, { key: 'I' }, { key: 'J' }, | |
| ]; | |
| const formatData = (data, numColumns) => { | |
| const numberOfFullRows = Math.floor(data.length / numColumns); |
| function absoluteSetInterval(fn, millis) { | |
| try { | |
| var baseTime = Date.now(); | |
| var callHandler = function() { | |
| if (Date.now() - baseTime > millis) { | |
| baseTime = Date.now(); | |
| fn(); | |
| } | |
| }; | |
| return { |
| import React from "react"; | |
| import AsyncFetcher from "react-async-fetcher"; | |
| const MyIpWidget = () => ( | |
| <AsyncFetcher url="https://ipapi.co/json/"> | |
| {({ isLoading, error, data }) => { | |
| // some loading state... | |
| if (isLoading) { | |
| return <p>Loading data...</p>; | |
| } |
| <?php | |
| try { | |
| $wsUrl = "HTTP://URL_COMPLETA_DO_WEBSERVICE?WSDL"; // normalmente as URLs de WS contém esse `?WSDL` no final... | |
| $clientSoap = new SoapClient($wsUrl, array( | |
| 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, | |
| "trace" => true, | |
| "encoding" => "utf-8", | |
| "exceptions" => true, | |
| "connection_timeout" => 120, |
| #!/bin/bash | |
| # Volume list file will have volume-id:Volume-name format | |
| VOLUMES_LIST=/var/log/volumes-list | |
| SNAPSHOT_INFO=/var/log/snapshot_info | |
| DATE=`date +%Y-%m-%d` | |
| REGION="sa-east-1" # change for your region | |
| # Snapshots Retention Period for each volume snapshot | |
| RETENTION=6 |
| <?php | |
| function randomPassword($len=8) | |
| { | |
| $chars = 'abcdefghijlmnopqrstuvxyzkw123456789'; | |
| $numChars = strlen($chars); | |
| $pwd = ''; | |
| for ($i=0; $i<$len; $i++) | |
| { | |
| $pwd .= substr($chars, rand(1, $numChars) - 1, 1); |