Skip to content

Instantly share code, notes, and snippets.

@ngrash
ngrash / gist:a4f7d2fb008dd2dc79d810bc799b3048
Created February 19, 2023 18:34
Framework Laptop Intel 12th gen GPU HANG
[ 2547.485145] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:0:00000000
[ 2547.485459] i915 0000:00:02.0: [drm] Resetting chip for stopped heartbeat on rcs0
[ 2547.587075] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.bin version 70.5.1
[ 2547.587085] i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc.bin version 7.9.3
[ 2547.602438] i915 0000:00:02.0: [drm] HuC authenticated
[ 2547.603310] i915 0000:00:02.0: [drm] GuC submission enabled
[ 2547.603318] i915 0000:00:02.0: [drm] GuC SLPC enabled
[ 2610.631743] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:0:00000000
[ 2610.631963] i915 0000:00:02.0: [drm] Resetting chip for stopped heartbeat on rcs0
[ 2610.735718] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.bin version 70.5.1
@ngrash
ngrash / bam.ino
Last active February 16, 2020 13:23
Arduino sketch that serves as an example on how to implement bit angle modulation for a single LED.
// This arduino sketch serves as an example on how to implement bit angle modulation for a single LED.
// Copyright (c) 2020 Nico Grashoff
// ledPin is the (digital) pin the LED is connected to.
const int ledPin = 4;
// brightness defines the desired brightness of the LED between 0 and 255.
const byte brightness = 130;
// setup is called once when the program starts.
@ngrash
ngrash / also_fade.ino
Created January 15, 2018 12:47
Two old Arduino sketches for fading LEDs.
void setup() {
Serial.begin(115200);
for (int pin = 3; pin < 13; pin++)
{
pinMode(pin, OUTPUT);
analogWrite(pin, 0);
}
}
@ngrash
ngrash / Dockerfile
Created September 6, 2017 11:40
Phoenix Dockerfile
FROM elixir:1.5
ARG MIX_ENV
ENV MIX_ENV ${MIX_ENV:-prod}
WORKDIR /usr/src/app/
RUN mix local.hex --force
RUN mix local.rebar --force
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -yq nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@ngrash
ngrash / has_sub_id.rb
Last active October 13, 2015 08:33
ID that increments in parent scope, e.g. 1.1, 1.2, 1.3, 2.1, 2.2, 3.1, 3.2 ...
module HasSubId
extend ActiveSupport::Concern
class_methods do
def sub_id_scope(parent=nil)
return @sub_id_scope unless parent
@sub_id_scope = parent
end
end