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
# ~/.zshrc | |
ZSH_DISABLE_COMPFIX=true | |
export ZSH="/Users/joshholtz/.oh-my-zsh" | |
# joshdholtz theme shows arch type in the prompt | |
ZSH_THEME="joshdholtz" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
# M1 and Rosetta |
# gem install multi_json json yajl-ruby oj benchmark-memory | |
require 'multi_json' | |
require 'json' | |
require 'yajl' | |
require 'oj' | |
require 'benchmark' | |
require 'benchmark-memory' | |
hash1 = { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Mobile HLS video</title> | |
</head> | |
<body> | |
<h1>Mobile HLS video</h1> |
pid = fork{ exec 'afplay', "song.mp3" } # on mac osx |
def colorize(text, color_code) | |
"\e[#{color_code}m#{text}\e[0m" | |
end | |
begin | |
# Here be dangerous things. | |
rescue => e | |
print "\r" << (' ' * 50) << "\n" | |
stacktrace = e.backtrace.map do |call| | |
if parts = call.match(/^(?<file>.+):(?<line>\d+):in `(?<code>.*)'$/) |
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
<button class="close" data-dismiss="alert">×</button> | |
<%= message %> | |
</div> | |
<% end %> |