This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%userprofile%\AppData\Local\Packages\Canonical...\LocalState\ext4.vhdx | |
wsl -l | |
wsl --unregister Ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GravatarService | |
def self.get(email_address, default_src, size = 40) | |
email_address = email_address.downcase | |
hash = Digest::SHA256.hexdigest(email_address) | |
params = URI.encode_www_form("d" => default_src, "s" => size) | |
image_src = "https://www.gravatar.com/avatar/#{hash}?#{params}" | |
image_src | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
NewerOlder