Skip to content

Instantly share code, notes, and snippets.

View tcodes0's full-sized avatar
:octocat:
hi

Raphael "Thom" Thomazella tcodes0

:octocat:
hi
View GitHub Profile
@tcodes0
tcodes0 / gist:b908141b3327bd01dd43f5ed5f92e74b
Created January 12, 2024 02:09
grim dawn speed levelling guide
see attach
/* a generic reflection based wrapper around common testing boilerplate
messages.On("Transaction", ctx, mock.AnythingOfType("func(storage.MessageStorer) error")).
Run(func(args mock.Arguments) {
err := args.Get(1).(func(tx storage.MessageStorer) error)(tx)
assert.NoError(err)
}).
Return(nil)
usage
@tcodes0
tcodes0 / linux-gaming.md
Last active May 7, 2023 06:57
Linux gaming

EA App

This app is needed for games on origin

How to do it

Install lutris the linux native game client

from lutris, install origin

@tcodes0
tcodes0 / curl-chat-gpt
Last active March 20, 2023 18:03
chat-gpt-curl
# add to shell init file
# invoke with `chatgpt`
# write prompt to prompt.txt on current dir
# install jq
chatgpt() {
if ! [ -f ./prompt.txt ]; then
echo "\"prompt.txt\" file not found on $PWD"
return 1
@tcodes0
tcodes0 / machine.js
Last active May 11, 2021 22:36
forms machine
const someMachine = Machine({
id: 'form-status',
initial: 'prefill',
states: {
prefill: {
on: {
SEND: 'sent',
SUBMIT: 'completed',
},
},
@tcodes0
tcodes0 / linkedin-reject-ptbr.txt
Created April 9, 2021 21:08
como rejeitar recruiters
Oi <Nome da pessoa>,
Obrigado por entrar em contato 😊
Então, atualmente trabalho com <sua empresa>
<pq sua empresa eh boa>
O trabalho é totalmente remoto e flexível, apenas <fuso> hora de diferença de fuso horário comigo.
Trabalho em uma equipe <pq sua equipe eh boa>
Gosto muito da minha equipe e dos produtos nos quais trabalhamos.
Consigo ter um bom equilíbrio entre a vida pessoal e profissional, nunca trabalho nos fins de semana e sem horas extras.
node -e 'var rates = new Array(130).fill(0).map((x, i) => (i+4) * 5000).map( year => ({ year, hour: (year/1920.1755589082431).toFixed(0), month: (year/12).toFixed(0) })); console.log(rates)''
@tcodes0
tcodes0 / mac-apfs-terminal-clone.md
Last active November 16, 2020 19:34
how to clone apfs volumes and make bootable
@tcodes0
tcodes0 / ppi-calc
Last active November 1, 2020 16:39
ppi calc
var TO_MILIMETER = 25.4
function calc_dpi (widthPixels: number, heightPixels: number, diagonal: float) {
var x = width
var y = height
var ratio = y/x;
var xd = Math.sqrt( Math.pow(diagonal,2) / ( 1 + Math.pow(ratio, 2) ));
var yd = xd * ratio;
var pitch = TO_MILIMETER/(x/xd);
var result = {
displayDiagonalCentimeters : diagonal * 2.54,
@tcodes0
tcodes0 / machine.js
Last active September 16, 2020 22:08
new note
const newNoteMachine = Machine({
id: 'newNoteMachine',
type: 'parallel',
context: { id: null },
states: {
userPrompt: {
initial: 'prompting',
states: {
prompting: { on: { INPUT: { target: 'working' } }, invoke: { src: 'userPrompt_prompting' } },
working: {