Installing mysql2
gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.
Make sure mysql-client
, openssl
and zstd
are installed on Mac via Homebrew.
Replace
mysql-client
with whichever mysql package you are using
Edit 2024-12-18:
Support for mouse emulation has now been implemented. See https://zmk.dev/docs/keymaps/behaviors/mouse-emulation
The instructions below are outdated.
You are writing a spec with type: :request
, i.e. an integration spec instead
of a controller spec. Integration specs are wrappers around Rails'
ActionDispatch::IntegrationTest
class. I usually write controller tests using
this instead of type: :controller
, mainly because it exercises more of the
request and response handling stack. So instead of writing something like
get :index
to start the request, you would write get books_path
or similar.
One of the issues with using type: :request
is that you lose the ability to
Primeiro, verifique se o módulo está presente na sua instalação digitando pacmd
em seu terminal, listando todos os módulos presentes pelo comando list-modules
e procurando por module-echo-cancel
. Não está presente? Você precisa adicionar algumas linhas ao arquivo de texto responsável pela configuração do PulseAudio.
Com o seu editor favorito, abra (com privilégios de administrador) o arquivo /etc/pulse/default.pa
e adicione as seguintes linhas ao fim do arquivo:
### Enable Echo/Noise-Cancellation
load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink
require 'openssl' | |
class String | |
def encrypt(key) | |
cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt | |
cipher.key = Digest::SHA1.hexdigest key | |
s = cipher.update(self) + cipher.final | |
s.unpack('H*')[0].upcase | |
end |
sudo aptitude install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev | |
sudo apt-get install libxslt-dev libxml2-dev | |
sudo apt-get install libmysqlclient-dev ruby-dev | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev | |
sudo apt-get install libsqlite3-dev | |
sudo apt-get install libreadline-dev | |
### Install Java ### | |
sudo apt-get install openjdk-6-jre-headless |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
#!/bin/sh | |
# | |
# Salve este script no diretório /etc/cron.hourly e dê permissão | |
# de execução a ele. Desse modo a cada hora sera verificada se a | |
# porcentagem de memória utilizada pelo sistema atingiu o valor definido | |
# na variável 'percent'. Caso positivo, o script informará ao kernel | |
# que este deverá alterar o valor da opção 'drop_caches' para 3. | |
# | |
# Mais detalhes: 'man proc' -> /proc/sys/vm/drop_caches. | |
PATH="/bin:/usr/bin:/usr/local/bin" |