Skip to content

Instantly share code, notes, and snippets.

View icy-arctic-fox's full-sized avatar

Michael Miller icy-arctic-fox

View GitHub Profile
@icy-arctic-fox
icy-arctic-fox / mount_component_broken.cr
Created March 30, 2021 20:29
Strange ordering issue with Crystal
# Doesn't work - `Error: undefined constant Lucky::BaseComponent`
module Lucky::MountComponent
# Appends the `component` to the view.
#
# When `Lucky::HTMLPage.settings.render_component_comments` is
# set to `true`, it will render HTML comments showing where the component
# starts and ends.
#
# ```
# m(MyComponent)
@icy-arctic-fox
icy-arctic-fox / debug.cr
Created May 22, 2019 19:40
Crystal Inheritance Bug
# Monkey-patch to show the relevant code.
# These methods are identical to what is implemented in Spectator,
# except that comments are removed and a `puts` debug line has been added.
# `super` is not called.
# The `SampleExampleGroupBuilder` overrides the same `#build` method in `NestedExampleGroupBuilder`.
# In the output, we can see the debug statements indicate that the wrong method is called.
module Spectator::DSL
class NestedExampleGroupBuilder < ExampleGroupBuilder
def build(parent : ExampleGroup, sample_values : Internals::SampleValues) : NestedExampleGroup
@icy-arctic-fox
icy-arctic-fox / apply.log
Last active April 30, 2018 22:56
Terraform trace output for issue #17976
2018/04/30 16:49:51 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2018/04/30 16:49:51 [INFO] Go runtime version: go1.10.1
2018/04/30 16:49:51 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2018/04/30 16:49:51 [DEBUG] Attempting to open CLI config file: /home/michael/.terraformrc
2018/04/30 16:49:51 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/04/30 16:49:51 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2018/04/30 16:49:51 [INFO] Go runtime version: go1.10.1
2018/04/30 16:49:51 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2018/04/30 16:49:51 [DEBUG] Attempting to open CLI config file: /home/michael/.terraformrc
2018/04/30 16:49:51 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
@icy-arctic-fox
icy-arctic-fox / keybase.md
Created April 25, 2018 02:43
Keybase Proof

Keybase proof

I hereby claim:

  • I am icy-arctic-fox on github.
  • I am arcticfox (https://keybase.io/arcticfox) on keybase.
  • I have a public key ASB5GBs-oHipbc3du7vqoha-UWxtH79XmK23HTKMO0bhJQo

To claim this, I am signing this object:

@icy-arctic-fox
icy-arctic-fox / Dockerfile
Last active March 2, 2018 21:34
Dockerfile for Grafana with Elasticsearch alerting
FROM centos:6.6
# Install dependencies.
RUN curl -sL https://rpm.nodesource.com/setup_6.x | bash - && \
yum install -y initscripts curl tar gcc libc6-dev git nodejs bzip2 freetype fontconfig urw-fonts
# Install Go.
# Note that 1.4 is needed first to build 1.9.
ENV GOLANG_VERSION 1.4
RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
@icy-arctic-fox
icy-arctic-fox / crontab
Last active March 14, 2022 17:28
Linux Mint Cinnamon Dark Mode
# Every day at 07:00 disable dark mode.
0 7 * * * /bin/sh /home/michael/.local/bin/dark-mode.sh false
# Every day at 21:00 enable dark mode.
0 21 * * * /bin/sh /home/michael/.local/bin/dark-mode.sh true