Skip to content

Instantly share code, notes, and snippets.

@mattbell87
mattbell87 / imac-sleep-fix.md
Last active November 15, 2026 19:33
iMac12,1 (21.5" mid-2011) HD6770M — fix graphical glitch/GPU lockup on wake from sleep on Linux (radeon.dpm=0)

iMac12,1 (21.5" mid-2011) — GPU glitch / lockup on wake from sleep (Linux)

Machine: Apple iMac12,1 (21.5", mid-2011) GPU driving the panel: AMD Radeon HD 6770M — "Whistler"/Turks, Northern Islands (TeraScale 2), PCI id 1002:6740 Driver: radeon kernel module (NOT amdgpu — this chip is pre-GCN, so radeon is the only option) OS when diagnosed: Fedora Linux 44 (KDE Plasma), kernel 7.1.4, X11, EFI boot Date fixed: 2026-07-22

Symptom

After waking from suspend, the Plasma desktop shows large black-and-white "stair-step"

@jdan
jdan / y
Last active May 22, 2020 17:51
(λ (f)
((λ (x) (f (x x)))
(λ (x) (f (x x)))))
@mfikes
mfikes / README.md
Last active September 29, 2026 23:44
eval in ClojureScript

ClojureScript master now has cljs.core/eval. This delegates to cljs.core/*eval* which, by default throws, but you can bind it to any implementation that can compile and evaluate ClojureScript forms.

If you require the cljs.js namespace (which is the main support namespace for self-hosted ClojureScript), then cljs.core/*eval* is set to an implementation that uses self-hosted ClojureScript for this capability. This means that all self-hosted ClojureScript environments will now have a first-class eval implementation that just works. For example, Planck master:

$ planck -q
cljs.user=> (eval '(+ 2 3))
5
@codefromthecrypt
codefromthecrypt / opentracing-zipkin.md
Last active October 27, 2021 01:44
My ramble on OpenTracing (with a side of Zipkin)

I've had many people ask me questions about OpenTracing, often in relation to OpenZipkin. I've seen assertions about how it is vendor neutral and is the lock-in cure. This post is not a sanctioned, polished or otherwise muted view, rather what I personally think about what it is and is not, and what it helps and does not help with. Scroll to the very end if this is too long. Feel free to add a comment if I made any factual mistakes or you just want to add a comment.

So, what is OpenTracing?

OpenTracing is documentation and library interfaces for distributed tracing instrumentation. To be "OpenTracing" requires bundling its interfaces in your work, so that others can use it to time distributed operations with the same library.

So, who is it for?

OpenTracing interfaces are targeted to authors of instrumentation libraries, and those who want to collaborate with traces created by them. Ex something started a trace somewhere and I add a notable event to that trace. Structure logging was recently added to O

@arrdem
arrdem / rendering.clj
Last active January 1, 2017 00:59
Textual programs as views of ASTs.
;; I write
(ns foo)
(defn adds-one [x]
(+ x 1))
(def another-adds-one
(partial + 1))
;; SYMBOL TABLE (name -> UUID)
;; warm up: balancing
=> (s/def ::balanced
(s/* (s/cat :open #{'<} :children ::balanced :close #{'>})))
:user/balanced
=> (s/conform ::balanced '[< < > < > > < >])
[{:open <, :children [{:open <, :close >} {:open <, :close >}], :close >} {:open <, :close >}]
=> (s/conform ::balanced '[< < > < < > > > < >])
[{:open <, :children [{:open <, :close >} {:open <, :children [{:open <, :close >}], :close >}], :close >} {:open <, :close >}]
;; infix to prefix
#lang typed/racket/base
(require (for-syntax racket/base
racket/sequence
racket/syntax
syntax/parse
syntax/stx)
racket/match)
(begin-for-syntax
anonymous
anonymous / ampcontrol.py
Created November 7, 2015 21:27
#!/usr/bin/env python
TCP_IP = '10.0.0.7'
TCP_PORT = 50001
BUFFER_SIZE = 1024
import socket
import sys, time
def send(MESSAGE):

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@henrik
henrik / reimplementing_plug_router.exs
Created June 10, 2015 18:44
Wanted to understand what Plug.Router does to get a "conn" available, so reimplemented it (without peeking).
defmodule Toy.GetContext do
def send_resp(conn, code, text) do
IO.puts "Response! conn: #{conn}, code: #{code}, text: #{text}"
end
def conn do
"the conn"
end
end