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 / rtsp-intelbras-outros.txt
Last active May 2, 2025 23:16
RTSP dvr intelbras e outros para acesso direto home assistant
-------- DVR e Mibo Smart Intelbras -------------------------------------------------------
rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0
Ps minha mibo smart im4c só funcionou com esse link:
rtsp://admin:chave de acesso@ip:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
-------- Luxvision -------------------------------------------------------
rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp
@alexishida
alexishida / configs-nginx-log-goaccess.txt
Created September 6, 2019 16:59
GoAccess NCSA Combined Log Format with Virtual Host NGINX
# NCSA Combined Log Format with Virtual Host
# nginx.conf
# https://goaccess.io/man#interactive-keys
log_format vcombined '$host:$server_port '
'$remote_addr $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
@alexishida
alexishida / Manual Instalação Token Safenet5110 Ubuntu.txt
Last active April 21, 2025 22:49
Instalando token SAFENET 5110 - Ubuntu
-----------------------------------------------------------------------------------------------------------------------------
PROCEDIMENTOS PARA INSTALAÇÃO SAFENET5110
Autor: Alex Ishida <alexishida@gmail.com>
Data: 13/08/2021
Versão: 1.0.0.0
-----------------------------------------------------------------------------------------------------------------------------
PASSO 1, instale alguns pacotes disponíveis no repositório oficial do Ubuntu.
-----------------------------------------------------------------------------------------------------------------------------
sudo apt update
@alexishida
alexishida / Manual Instalação Token GD Starsign CUT Ubuntu.txt
Last active April 3, 2025 20:42
Manual Instalação Token GD Starsign CUT Ubuntu
-----------------------------------------------------------------------------------------------------------------------------
PROCEDIMENTOS PARA INSTALAÇÃO Giesecke & Devrient GmbH StarSign CUT S
Autor: Alex Ishida <alexishida@gmail.com>
Data: 27/10/2023
Versão: 1.0.0.0
-----------------------------------------------------------------------------------------------------------------------------
PASSO 1, instale alguns pacotes disponíveis no repositório oficial do Ubuntu.
-----------------------------------------------------------------------------------------------------------------------------
sudo apt update
@alexishida
alexishida / PulseAudio with Pipewire.txt
Created September 26, 2022 16:37
Configure bluetooth PulseAudio which supports HSP, HFP and A2DP (PulseAudio with Pipewire sound server)
My headset microphone was not detected by PulseAudio and the problem is that my headphones don't have HSP profile,
only HFP profile. After trying for 2 days, I came to the solution of replacing PulseAudio with Pipewire sound server, which supports HSP, HFP and A2DP by itself.
So there will be no need to install any other utility like ofono, phonesim. Also, to be noted that my problem wasn't
resolved even after following all the steps to configure ofono in PulseAudio.
So I came up with the steps to replace PulseAudio with PipeWire.
Here is the detailed article I have written to resolve this problem, the steps of which I'm also adding here. You can follow it and most probably be able to solve your problem.
Bluetooth headset microphone not detected
Open your terminal and follow these steps:
@alexishida
alexishida / Rails Oracle Client 21 Linux
Last active March 7, 2025 03:39
Rails Oracle Client 21 Linux
# Version 21.6.0.0.0 (Requires glibc 2.14)
# Instalar a biblioteca (http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.113-5_amd64.deb)
sudo apt-get install libaio1 libaio-dev unzip
# Criar a pasta
sudo mkdir /opt/oracle
# Mover para /opt/oracle
instantclient-basic-linux.x64-21.6.0.0.0.zip
instantclient-sdk-linux.x64-21.6.0.0.0.zip
@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 / comandos-ruby-rails-exemplos.txt
Last active February 24, 2025 13:39
Comandos Ruby e Rails
# Removendo o carregamento onhover de links
<meta name="turbo-prefetch" content="false">
# Method Delete link_to no turbo
<%= link_to logout_path, class: "nav-link", data: { turbo_method: :delete, turbo: true } do %>
# COMANDOS
rails new appname -d postgresql
rails new appname --api
@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