Skip to content

Instantly share code, notes, and snippets.

@havenwood
havenwood / each.rb
Created July 5, 2022 18:44
An example of why we use `each` rather than `for` and what semicolon block args do for #ruby IRC
foo = :untouched
bar = :untouched
[:touched].each do |foo|
bar = :touched
end
foo #=> :untouched
bar #=> :touched

How to install Homebrew package manager on Steam Deck

(See also installing Distroboxm, which is included in SteamOS 3.5 and newer: https://distrobox.it/ )
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-steam-deck )

You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.

  1. Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
  2. Click the logo at the bottom left, go to System, then go to Konsole
@havenwood
havenwood / super.rb
Created May 25, 2018 17:54
Example's of how Ruby's super keyword passes on args and blocks
class Foo
def foo arg = false
{arg: arg, block: block_given?}
end
end
class Bar < Foo
def foo *args
super
end