Skip to content

Instantly share code, notes, and snippets.

View lseppala's full-sized avatar

Lane Seppala lseppala

  • GitHub
  • Boulder, Colorado
View GitHub Profile
@lseppala
lseppala / dom3d.js
Created August 6, 2024 19:12 — forked from OrionReed/dom3d.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
#!/usr/bin/env carton exec plackup
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Log::Log4perl;
use Data::Printer;
use Mojo::Server::PSGI;
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
import Control.Arrow ((&&&))
import Data.Functor.Coyoneda
import qualified Control.Monad.Free as F
@lseppala
lseppala / 32.asm
Created February 15, 2017 17:36 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
https://github.com/defunkt/gist
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
module Data.JsonApi.Modify where
import Control.Arrow
import Data.JsonApi.Object.Resource
import Data.Text
newtype AddRelationship a = AddRelationship
graf-0.1.0.0: test (suite: timeseries)
Timeseries tests
Properties
(checked by QuickCheck)
: Getting url: /v1/sensor/befba983-94b5-408b-a9be-b2cac091b082/timeseries?page%5Bid%5D=1089322a-aa9e-4a0e-b48e-1e9345ab0403&page%5Bsize%5D=45&filter%5Bend%5D=1970-01-28T15:10:10Z&filter%5Bstart%5D=1970-01-18T05:04:37Z&bucket%5Btype%5D=min,max&bucket%5Bsize%5D=10m
Received:
[DataPoint {_port = "agg(c)", _value = Object (fromList [("max",Number -12.0),("min",Number -12.0)]), _time = 1970-01-18 05:00:00 UTC, _uuid = Just 3ae30ff1-dc04-4371-a7b3-db015e8e20ec},DataPoint {_port = "agg(a)", _value = Object (fromList [("max",Number 99.0),("min",Number 99.0)]), _time = 1970-01-20 00:50:00 UTC, _uuid = Just 15643101-ccbc-44dc-ac11-7a33394b0735},DataPoint {_port = "agg(b)", _value = Object (fromList [("max",Number -15.0),("min",Number -26.0)]), _time = 1970-01-20 00:50:00 UTC, _uuid = Just adcbed38-9983-401b-b00d-c895d7e014fc},DataPoint {_port = "agg(c)", _value = Object (fromList [("max",Number 99.0),("min",Number -
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
import Control.Arrow ((&&&))
import Data.Functor.Coyoneda
import qualified Control.Monad.Free as F
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
module NestedVL where
import Control.Monad.Free.VanLaarhovenE
data Logging m = Logging