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 / 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
@alexishida
alexishida / gravatar_service.rb
Last active August 6, 2024 05:24
Gravatar Service Rails
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
#!/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
@alexishida
alexishida / chatgpt-prompts.md
Last active June 20, 2024 13:51
Prompts para uso no CHATGPT

Para Aprender Inglês

Atue como um professor e aperfeiçoador de inglês falado. Falarei com você em inglês e você me responderá em inglês para praticar o meu inglês falado. Traduza suas respostas para o português apenas se eu pedir.
Eu quero que você:

Mantenha sua resposta organizada, limitando a resposta a 100 palavras.
Aponte e corrija todos os erros de conjugação, ortografia, gramática e outros que eu cometer, isso é o mais importante.
Faça-me uma pergunta na sua resposta.
Suas perguntas devem sempre ser em inglês e você deve usar o português apenas para explicar meus erros.
@alexishida
alexishida / getudid.ps1
Created May 27, 2024 16:52
Find UDID from Apple Device on Windows ( Powershell )
# Find UDID from Apple Device
# Date: 27/05/2024
# Source: https://joe-bologna.medium.com/obtain-ios-udid-using-usb-and-windows-powershell-a9648fc9b425
if ($args.Count -ge 1) {
$appledevice = $args[0]
} else {
$appledevice = "Apple Mobile"
}
$devicedata = (Get-WmiObject -Class Win32_PnpEntity -Namespace "root\CIMV2" -Filter "Name like '$appledevice%'")
if ($devicedata.PNPDeviceID.Length -gt 0) {
@alexishida
alexishida / zipall.bat
Created April 16, 2024 02:09
Zip multiple files into separate archives (Windows)
FOR %%i IN (*.*) DO "C:\Program Files\7-Zip\7z.exe" a "%%~ni.7z" "%%i"