Skip to content

Instantly share code, notes, and snippets.

View stormbrew's full-sized avatar

stormbrew stormbrew

  • Edmonton, Alberta, Canada
View GitHub Profile
def surprising_case(*a)
case
when *a
true
else
false
end
end
surprising_case(false, false, false) # => false

Keybase proof

I hereby claim:

  • I am stormbrew on github.
  • I am stormbrew (https://keybase.io/stormbrew) on keybase.
  • I have a public key whose fingerprint is EBFB DE2E E440 3651 7D36 5BAB A73A 5685 5652 77EF

To claim this, I am signing this object:

#include <system_error>
int main() {
std::error_code x = std::make_error_code(std::errc::no_such_file_or_directory);
printf("%d\n", x != std::errc::no_such_file_or_directory); // Should print 0, does on libstdc++6 < 5. Prints 1 on libstdc++6-5
}
@stormbrew
stormbrew / .i3config
Created April 6, 2016 21:43
i3wm ctrl-p for window switching
bindsym $mod+o exec i3-msg '[id='$(i3-msg -t get_tree | jq -r 'recurse(.nodes[]) | select(.window) | (.window | tostring) + ":" + .name' | ~/.config/bin/dmenu_map -i)'] focus'
bindsym $mod+Mod1+o exec i3-msg '[id='$(i3-msg -t get_tree | jq -r 'recurse(.nodes[]) | select(.window and .urgent) | (.window | tostring) + ":" + .name' | ~/.config/bin/dmenu_map -i)'] focus'