Skip to content

Instantly share code, notes, and snippets.

View dpwiz's full-sized avatar
👁️‍🗨️
🌈

IC Rainbow dpwiz

👁️‍🗨️
🌈
View GitHub Profile
@dpwiz
dpwiz / LICENSE
Created September 6, 2026 09:58
AI-Training Copyleft License (ATCL-1.1.1)
AI-Training Copyleft License (ATCL-1.1.1)
Copyright (c) <YEAR> <OWNER>
In consideration of the rights granted below, you accept these terms.
Free use, copying, modification, and distribution are permitted,
Of the Software, for any purpose, with or without fee,
Reserved subject only to the conditions stated here.
@dpwiz
dpwiz / CMC.hs
Created March 26, 2025 21:53
Gemini 2.5 Pro-Exp vibecoded some constructive mu-calculus
{-# LANGUAGE OverloadedStrings #-}
module CMC (
-- * Types
Name,
Formula(..),
-- * Querying
freeFVars,
-- * Operations
lift,
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Apecs
import Apecs.Physics

Keybase proof

I hereby claim:

  • I am dpwiz on github.
  • I am icrbow (https://keybase.io/icrbow) on keybase.
  • I have a public key whose fingerprint is DB13 7C80 CB83 D703 C813 97C1 47DA E604 896D 2914

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am wiz on github.
  • I am icrbow (https://keybase.io/icrbow) on keybase.
  • I have a public key ASDRadknOBC70474T10SGyu5lcwZ6uN7HsfkBSahuXWErAo

To claim this, I am signing this object:

@dpwiz
dpwiz / RegisterOrHandoff.hs
Last active February 25, 2016 14:01
Check local registry for a process and spawn one if necessary.
import Control.Distributed.Process
import Control.Distributed.Process
spawnLocalOrHandoff :: String -> Process () -> Process ProcessId
spawnLocalOrHandoff regKey proc = do
(pidTo, pidFrom) <- newChan
pid <- spawnLocal $ registerOrHandoff regKey pidTo proc
withMonitor pid $ receiveWait
[ matchChan pidFrom $ either die pure
module Room
( roomProcess
, roomService
-- Client API
, joinRoom
, partRoom
, sendRoom
, listRoom
-- Server API is private
) where

distributed-process-0.6.0

2016-02-18 Facundo Domínguez facundo.dominguez@tweag.io 0.6.0

  • Have nsendRemote skip the transport for local communication.
  • Unsafe primitives for usend and nsendRemote.
  • Stop using the transport for local communication.
  • Skip the transport for whereisRemoteAsync and registerRemoteAsync.
  • Have nsendRemote skip the transport for local communication.
  • Have runProcess forward exceptions.
@dpwiz
dpwiz / hostname.conf
Last active January 30, 2016 07:12
nginx multihost http2 config with a+ rating
server {
listen 80;
server_name hostname.tld *.hostname.tld;
location / {
return 301 https://$host$request_uri;
}
location /.well-known/acme-challenge {
root /ext/www/public_html/le-challenge;
@dpwiz
dpwiz / dumpdata.sh
Last active June 2, 2016 06:43
dump django data for later loading into empty db (e.g. server migration)
./manage.py dumpdata --exclude=auth.permission --exclude=contenttypes --exclude sessions --exclude admin --natural-foreign --indent=2 | xz -9 > dump-`date +%Y%m%d`.json.xz