Skip to content

Instantly share code, notes, and snippets.

View alexishida's full-sized avatar
👨‍💻
Coding

Alex Ishida alexishida

👨‍💻
Coding
View GitHub Profile
@alexishida
alexishida / oracle-rails.md
Created July 21, 2025 15:09
Tabela de Configuração de Timeout - Oracle 23ai e Ruby on Rails

Tabela de Configuração de Timeout - Oracle 23ai e Ruby on Rails

Tipo de Timeout Dev/Test Produção Crítico (Low Latency) Parâmetro Ruby on Rails Parâmetro Oracle 23ai
Conexão 5s 3s 2s connect_timeout: SQLNET.OUTBOUND_CONNECT_TIMEOUT
Query/Statement 15s 10s 5s sql_timeout: STATEMENT_TIMEOUT
Transação 60s 30s 15s timeout: (no código) _TX_TIMEOUT (parâmetro oculto)
Pool Idle 5min 1min 30s idle_timeout: -
Inatividade Sessão 120min 30min 15min -
@alexishida
alexishida / setup_cursor_ubuntu.md
Created July 11, 2025 14:09 — forked from evgenyneu/setup_cursor_ubuntu.md
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
@alexishida
alexishida / compare-csv.rb
Created February 24, 2025 13:41
Compare csv files in ruby
require "csv"
# Caminhos dos arquivos CSV
arquivo1 = "cnpj_originais.csv"
arquivo2 = "cnpj_gerados.csv"
# Função para ler os dados de um arquivo CSV com uma coluna
def ler_dados(arquivo)
CSV.read(arquivo).flatten
end
@alexishida
alexishida / docker-clickhouse.txt
Last active February 4, 2025 13:41
Clickhouse docker desenv
docker run -d \
--name clickhouse-server \
--restart=always \
--ulimit nofile=262144:262144 \
-e CLICKHOUSE_DB=my_database \
-e CLICKHOUSE_USER=root \
-e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 \
-e CLICKHOUSE_PASSWORD=123456 \
-v /storage/clickhouse/data:/var/lib/clickhouse/ \
-v /storage/clickhouse/logs:/var/log/clickhouse-server/ \
# Config pra cache do hotwire html em desenv
config.cache_classes = false
config.enable_reloading = true
config.eager_load = false
# Prropshaft
npm install imask
./bin/importmap pin imask
@alexishida
alexishida / gist-backup.py
Created September 6, 2024 01:12
Python script for backing up gists
import requests
import sys
import re
from subprocess import call
user = 'alexishida'
num_pages = 10
# Função para sanitizar o nome da pasta, removendo caracteres inválidos
def sanitize_folder_name(name):
@alexishida
alexishida / windows-commands.txt
Last active September 30, 2024 01:06
useful windows commands
# Disable Teredo
netsh interface teredo set state disabled
## 3 . You may need to reboot, depending on your version of Windows.
## If you wish to re-enable Teredo at some point you can issue the command:
netsh interface teredo set state type=default
# Reset network cache
@alexishida
alexishida / vscode rails extensions.txt
Last active August 14, 2024 00:53
vscode rails extensions
Extensions
Ruby
https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-extensions-pack
This plugin is highly recommended for its debugging capabilities and general Ruby support.
Rufo
https://marketplace.visualstudio.com/items?itemName=mbessey.vscode-rufo
Perfect for formatting your Ruby files (.rb). It’s a great alternative if you prefer not to use Rubocop.
@alexishida
alexishida / wsl-commands.txt
Created August 10, 2024 04:25
wsl commands
%userprofile%\AppData\Local\Packages\Canonical...\LocalState\ext4.vhdx
wsl -l
wsl --unregister Ubuntu
@alexishida
alexishida / sites-compile-interpreter.txt
Created August 6, 2024 13:10
make Compiler Interpreter documentation sites
https://medium.freecodecamp.org/the-programming-language-pipeline-91d3f449c919
https://www.thecrazyprogrammer.com/2017/02/lexical-analyzer-in-c.html
https://hackernoon.com/compilers-and-interpreters-3e354a2e41cf
https://hackernoon.com/lexical-analysis-861b8bfe4cb0
https://en.wikibooks.org/wiki/Compiler_Construction/Lexical_analysis