Esse script é um hook customizado para possibilitar a espera da execução de atualização de estados no ReactJS.
Exemplo de uso:
import React, {useState} from 'react';
import useStateWithPromise from 'useStateWithPromise.js';
| #!/bin/bash | |
| function failure { echo $@ >&2; exit 1; } | |
| RANCHER_NAMESPACE=${RANCHER_NAMESPACE:-cattle-system} | |
| RANCHER_RELEASE_NAME=${RANCHER_RELEASE_NAME:-rancher} | |
| # Pre-Flight checks | |
| echo "ok"|sed -r "s/^(ok)/yes/"|grep yes >/dev/null \ | |
| && echo "Preflight test : sed ok" \ | |
| || failure "Your sed does not support extended regexp, more info at https://github.com/rancher/rancher/issues/35319#issuecomment-1173825923" |
| 'use strict'; | |
| // Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
| // http://creativecommons.org/publicdomain/zero/1.0/ | |
| (function() { | |
| // Update 'version' if you need to refresh the cache | |
| var staticCacheName = 'static'; | |
| var version = 'v1::'; |
WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines
A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like [Unreal](https:
| import React, { useMemo } from 'react'; | |
| import { | |
| Document as PDFDocument, | |
| StyleSheet, | |
| Page, | |
| Font, | |
| } from '@react-pdf/renderer'; | |
| import dig from 'lodash.get'; | |
| import PageFooter from './PageFooter'; | |
| import CoverPage from './CoverPage'; |
| [alias] | |
| ci = commit | |
| co = checkout | |
| cm = checkout master | |
| cb = checkout -b | |
| st = status -sb | |
| sf = show --name-only | |
| lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
| incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
| outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
| const nodemailer = require('nodemailer'); | |
| const transporter = nodemailer.createTransport({ | |
| host: 'smtp.zoho.com', | |
| port: 465, | |
| secure: true, //ssl | |
| auth: { | |
| user: 'youremail@amitbend.com', | |
| pass: 'yourpassword' | |
| } | |
| }); |
| import * as tf from "@tensorflow/tfjs" | |
| import "@tensorflow/tfjs-node" | |
| import iris from "./iris.json" | |
| import irisTesting from "./iris-testing.json" | |
| // convert/setup our data | |
| const trainingData = tf.tensor2d(iris.map(item => [ | |
| item.sepal_length, item.sepal_width, item.petal_length, item.petal_width, | |
| ])) | |
| const outputData = tf.tensor2d(iris.map(item => [ |
| aws s3 rm s3://somebucket/somefolder/ --recursive --dryrun --exclude "*" --include "*.json" |