Skip to content

Instantly share code, notes, and snippets.

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

Alex Ishida alexishida

👨‍💻
Coding
View GitHub Profile
#!/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"
@alexishida
alexishida / wp-permissions-script
Created April 8, 2024 17:20 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory
@alexishida
alexishida / C++_commands.txt
Created October 31, 2023 04:34
C++ commands
# https://code.visualstudio.com/docs/cpp/config-wsl
# https://code.visualstudio.com/docs/cpp/config-linux
sudo apt-get install build-essential gdb
@alexishida
alexishida / Manual Instalação Token GD Starsign CUT Ubuntu.txt
Last active December 21, 2023 18:46
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 / atualizacao.sh
Created September 14, 2022 02:06
script para atualizacao de servidores ubuntu
#!/bin/bash
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get autoremove -y
reboot
@alexishida
alexishida / schedule.rb
Created August 9, 2022 16:10
schedule.rb cron gem whenever rails
env :PATH, "/opt/oracle/instantclient_12_2:#{ENV['PATH']}"
env :LD_LIBRARY_PATH, '/opt/oracle/instantclient_12_2'
env :GEM_PATH, ENV['GEM_PATH']
ENV.each { |k, v| env(k, v) }
env :RAILS_ENV, ENV['RAILS_ENV']
# env :PATH, ENV['PATH']
set :output, error: 'log/whenever_error.log', standard: 'log/whenever.log'
every '20 10 2 * *' do