Skip to content

Instantly share code, notes, and snippets.

View connorbey13's full-sized avatar

Connor Bey 13 connorbey13

View GitHub Profile
@connorbey13
connorbey13 / automount_nfs_mac.md
Last active April 9, 2023 14:43
How to automount NFS on Mac

How to automount NFS on Mac

Lots of misinformation out there but it is simple, you just edit fstab like you would on Linux with the caveat of using vifs to do it.

  1. Run the command in terminal with sudo
    sudo vifs

  2. Add the config using this template and save
    server:sharedir localmountpoint nfs rw
    For example:\

@connorbey13
connorbey13 / application_helper.rb
Last active July 8, 2022 22:17
turbo_custom_cable_stream
module ApplicationHelper
def turbo_custom_stream_from(*streamables, **attributes)
attributes[:channel] = attributes[:channel]&.to_s || "Turbo::StreamsChannel"
attributes[:"signed-stream-name"] = Turbo::StreamsChannel.signed_stream_name(streamables)
tag.turbo_custom_cable_stream_source(**attributes)
end
end