Skip to content

Instantly share code, notes, and snippets.

View CarolHsu's full-sized avatar
🎯
Focusing

shesee CarolHsu

🎯
Focusing
  • Rochester, NY
  • 17:25 (UTC -05:00)
View GitHub Profile
@CarolHsu
CarolHsu / .gitconfig
Last active February 24, 2022 21:41
Neovim as git diff and merge tool
[diff]
tool = nvimdiff
[difftool]
prompt = true
[difftool "nvimdiff"]
cmd = nvim -d $LOCAL $REMOTE
[merge]
tool = nvimdiff
[mergetool]
keepBackup = false
@CarolHsu
CarolHsu / solution.md
Created April 17, 2020 16:38
How to solve rbenv BUILD FAILED for OS X 10.15 with openssl (fish shell)

in ~/.config/fish/config.fish

set -x RUBY_CONFIGURE_OPTS --with-openssl-dir=(brew --prefix openssl@1.1)

and reload by

$ source ~/.config/fish/config.fish
{
"req_body":{
"cart":{
"total_weight":254,
"item_count":1,
"requires_shipping":null,
"bold_cart_id":9643389,
"cart_token":"ca5c598902d2828a6d1405a6bd41d5ee",
"public_token":"1769fb7c418b104c75b73f955bcda565f7a939c7",
"attributes":null,
{
"req_body":{
"cart":{
"total_weight":254,
"item_count":1,
"requires_shipping":null,
"bold_cart_id":9643389,
"cart_token":"ca5c598902d2828a6d1405a6bd41d5ee",
"public_token":"1769fb7c418b104c75b73f955bcda565f7a939c7",
"attributes":null,
# delete column
ActiveRecord::Migration.remove_column :table_name, :column_name
# drop table
ActiveRecord::Migration.drop_table :table_name

Index order matters!

For exapmle polymor, Rails 4 or older created the index such as

add_index "http_responses", ["originator_type", "originator_id"], name: "index_http_responses_on_originator_id_and_originator_type", using: :btree

it's certainly slower than

@CarolHsu
CarolHsu / note_for_autheticate_link.md
Last active March 14, 2019 02:48
How to link authorize http URL without enter username and password manually