start new:
tmux
start new with session name:
tmux new -s myname
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // |
| {-# LANGUAGE GADTs, ConstraintKinds, KindSignatures, DeriveDataTypeable #-} | |
| {-# LANGUAGE TypeOperators, ScopedTypeVariables, FlexibleInstances #-} | |
| module Shape where | |
| import Control.Applicative ((<$>), (<|>)) | |
| import Data.Maybe (mapMaybe) | |
| import Data.Typeable | |
| import GHC.Exts (Constraint) | |
| #! /usr/bin/env stack | |
| -- stack --resolver lts-18.8 script | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {- | |
| This is a handy illustration of converting between five of the commonly-used | |
| string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
| Text). |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
| # edit the login message | |
| vi /etc/motd | |
| # switch to usable repos - iSH defaults often failed with EOF errors | |
| echo https://dl-cdn.alpinelinux.org/alpine/v3.13/main > /etc/apk/repositories | |
| echo https://dl-cdn.alpinelinux.org/alpine/v3.13/community >> /etc/apk/repositories | |
| # install some basics | |
| apk add zsh bash | |
| apk add sed attr dialog dialog-doc bash bash-doc bash-completion grep grep-doc |
| -- | ⚠️ IMPORTANT | |
| -- | |
| -- This code is UNTESTED and UNLICENSED. Use at your own risk and do whatever | |
| -- you want with it. | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| module Plutus.ManagedDelegation where |
| /** Turbo Plutus 🔥 | |
| * an easy to use library for smart contract generation with NO learning curve | |
| * | |
| * example usage: | |
| * ```ts | |
| * import makeSmartContract from "Turbo_Plutus🔥.ts" | |
| * | |
| * const shotMyselfInTheFootContract = makeSmartContract(); | |
| * ``` | |
| * |