Skip to content

Instantly share code, notes, and snippets.

@pquimo
pquimo / gist:7623184dd229dfbb50f3c0fcd1d6923c
Created February 24, 2021 17:12
compiling mysql 8 on M1 mac
I have everything going into /opt/frog, but any path will work as long as you don't need sudo to write to it.
First, we need to compile openssl and cmake as they will be used during the compilation of mysql.
### openssl 1.1.1i
cd /opt/frog/src
curl --remote-name https://www.openssl.org/source/openssl-1.1.1i.tar.gz
tar xf openssl-1.1.1i.tar.gz
cd openssl-1.1.1i
./configure darwin64-arm64-cc --prefix=/opt/frog/openssl-1.1.1i
@pquimo
pquimo / History|-1935dfcb|entries.json
Last active June 3, 2022 21:59
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/makani/src/atp/listsdb/tasks/JadeTasks/Shared/devtest/MemorySilo.swift","entries":[{"id":"hHcn.swift","timestamp":1654277979758}]}
@pquimo
pquimo / gist:fa4a6ca92f746086d74e183e0c31012d
Created December 29, 2016 16:12
kinesis advantage 2 layout file
[tab]>[escape]
[caps]>[tab]
[down]>[obrack]
[obrack]>[cbrack]
[cbrack]>[down]
[intl-\]>[lalt]
[lalt]>[delete]
[lctrl]>[bspace]
[delete]>[rwin]
[bspace]>[lctrl]
@pquimo
pquimo / gist:6328a274ee4ddb0dc53a2f4b358d95e3
Last active January 4, 2018 02:52
kinesis advantage v2

net result: http://www.keyboard-layout-editor.com/#/layouts/a3e0e4ed3ba8062b1cfcf454436477f2

the red keys are ones I never press, the orange ones rarely press enable key remapping by pressing Progrm + F12, then sequences of keys: press they key you want it to be first, then the key you will press to get that

version 2 transition notes

the mac/windows mode seems to be more significant now. at least different. I'll figure out Windows later, but for now, it looks like it's a good rule to switch mac mode (Program + F5) immediately, and never switch out.

power user mode

To activate Power User Mode, press and hold the Program Key and the Shift Key, and then tap the Escape Key. Important Note: If you accidentally tap Esc before pressing Shift, you will generate a Status Report. All four LED indicator lights will flash four times to indicate Power User Mode has been activated, and two times to indicate when it has been deactivated. Note: When Power User Mode is active, a new line on the Status Report wil

@pquimo
pquimo / gist:3fd3c9709ce3419f3d3c
Last active August 29, 2015 14:04
mysql 5.6 passwordless login

create one:

  • mysql_config_editor set --login-path=nameofnewloginthing --host=somehost --user=someuser --password

use it:

  • mysql --login-path=nameofnewloginthing
@pquimo
pquimo / gist:5135096
Created March 11, 2013 15:36
same as this gist, https://gist.github.com/pquimo/5135035, except using an array instead
names = []
names << "Ylva"
names << "Brighid"
names.each do |name|
puts name
end
@pquimo
pquimo / gist:5135035
Last active December 14, 2015 19:09
using RubyTapas episode 070 "break" as inspiration, try an on-the-fly version of the technique... which unfortunately doesn't work...
names = Proc.new do |&blk|
blk.call("Ylva")
blk.call("Brighid")
end
names.call do |name|
puts name
end
@pquimo
pquimo / gist:4544613
Last active December 11, 2015 04:19
approximate ruby equivalent of C++ local object destructors to guarantee cleanup
def has_return
puts "start of has_return"
return
puts "unreachable code in has_return"
ensure
puts "cleanup from has_return method"
end
def has_exception
puts "start of has_exception"
@pquimo
pquimo / gist:4158077
Created November 28, 2012 00:07
mac osx: uninstall all ruby gems
sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx