Skip to content

Instantly share code, notes, and snippets.

View guilhermebkel's full-sized avatar
👨‍🏫
programming and mentoring

Guilherme Mota guilhermebkel

👨‍🏫
programming and mentoring
View GitHub Profile
@AlexisDucastel
AlexisDucastel / rancher-upgrade-cert-manager-version.sh
Last active April 14, 2023 18:00
Rancher fix for cert-manager failure on rancher upgrade (no matches for kind "Issuer" in version cert-manager.io/v1beta1)
#!/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"
@jeff-pal
jeff-pal / README.md
Last active October 15, 2021 22:29
ReactJS - Hook customizado - useState() com Promise.

useStateWithPromise

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';
'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::';
@khaosdoctor
khaosdoctor / workingwithlucas-en-us.md
Last active May 30, 2025 09:24
Useful info when working with me

Working with Lucas

Creation Date: June 2020

Status: in progress

A collection of stuff that might come in handy when working with me

My personal philosophy:

@raysan5
raysan5 / custom_game_engines_small_study.md
Last active December 2, 2025 17:16
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

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:

@chadwilken
chadwilken / Document.jsx
Created March 2, 2020 18:20
React PDF w/ UGC
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}..)
@amitbend
amitbend / nodemailer with Zoho
Last active October 17, 2022 12:32
nodemailer with Zoho
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
host: 'smtp.zoho.com',
port: 465,
secure: true, //ssl
auth: {
user: 'youremail@amitbend.com',
pass: 'yourpassword'
}
});
@learncodeacademy
learncodeacademy / iris-tensorflow-js.js
Last active June 25, 2024 21:40
Solving Iris with Tensorflow.js and Iris JSON dataset
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 => [
@DinosaurDad
DinosaurDad / aws-s3-delete-files-with-extension.sh
Created January 15, 2018 20:57
AWS - S3 - Delete files with extension
aws s3 rm s3://somebucket/somefolder/ --recursive --dryrun --exclude "*" --include "*.json"