Skip to content

Instantly share code, notes, and snippets.

View HenriqueMitsuo's full-sized avatar
🏠
Working from home

Henrique Mitsuo HenriqueMitsuo

🏠
Working from home
  • Melhor Plano
  • Jacupiranga, Brazil
View GitHub Profile
@HenriqueMitsuo
HenriqueMitsuo / repository.ts
Created April 20, 2024 23:13 — forked from cayter/repository.ts
Drizzle ORM Type-Safe Repository With PgTable
import { startSpan } from "@sentry/remix";
import type { StartSpanOptions } from "@sentry/types";
import {
type AnyColumn,
type AnyTable,
type BuildQueryResult,
type DBQueryConfig,
type DrizzleTypeError,
type Equal,
type ExtractTablesWithRelations,
@HenriqueMitsuo
HenriqueMitsuo / gist:dcfabd3fbaf9073f47a16ee5ff0e3d20
Created December 29, 2022 16:34
image Side by side github markdown
Solarized dark | Solarized Ocean
:-------------------------:|:-------------------------:
![](https://...Dark.png) | ![](https://...Ocean.png)
@HenriqueMitsuo
HenriqueMitsuo / index.ts
Last active October 19, 2022 19:07
pipedrive-sandbox-test
const pipedrive = require("pipedrive");
const defaultClient = pipedrive.ApiClient.instance;
let apiToken = defaultClient.authentications.api_key;
apiToken.apiKey = "API KEY";
const dealsApi = new pipedrive.DealsApi();
const dealFieldsApi = new pipedrive.DealFieldsApi();
enum CustomFields {
# lazyload nvm
# all props goes to http://broken-by.me/lazy-load-nvm/
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/
lazynvm() {
unset -f nvm node npm npx
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
if [ -f "$NVM_DIR/bash_completion" ]; then
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
const r = new RegExp(/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/)
private generateCityRegex(cityString: string): RegExp {
const accents = {
A: "[A,À,Á,Â,Ã,Ä,Å]",
O: "[O,Ò,Ó,Ô,Õ,Õ,Ö,Ő]",
E: "[E,È,É,Ê,Ë]",
C: "[C,Ç]",
D: "[D,Ð]",
I: "[I,Ì,Í,Î,Ï]",
U: "[U,Ù,Ú,Û,Ü,Ű]",
N: "[N,Ñ]",
// import axios from "axios";
import { axios } from "@/plugins/axios"; // vue
export class ApiService {
constructor(Resource) {
this.Resource = Resource;
this.Token = { Authorization: `Bearer ${localStorage.getItem("token")}` };
}
async queryAll() {
@HenriqueMitsuo
HenriqueMitsuo / docker.md
Last active December 28, 2020 16:39
Docker Reference

Docker Commands Reference

docker pull: docker pull [OPTIONS] NAME[:TAG|@DIGEST]

  • docker pull jturping/hollywood
    • Pull an image or a repository from a registry

docker inspect: docker inspect [OPTIONS] NAME|ID [NAME|ID...]

  • docker inspect node:12-stretch
    • Outputs metadata about the container
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

Função map

  • função utilizada para converter escalas

Arquitetura de computadores

  • Registradores
  • CISC Complex Instruction Set Computer

  • Arduino Atmel AVR
    • Possui 32 registradores de 8 bits de uso geral(GPRs)
    • O Bit 0 é menos significativo
  • O Bit 7 é o mais significativo