This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack script --resolver lts-11.22 --package singletons | |
{-# OPTIONS_GHC -Wall -Werror=incomplete-patterns #-} | |
{-# LANGUAGE UnicodeSyntax, TemplateHaskell, RecordWildCards #-} | |
{-# LANGUAGE ScopedTypeVariables, RankNTypes, TypeApplications #-} | |
{-# LANGUAGE DataKinds, TypeFamilies, GADTs, KindSignatures #-} | |
{-# LANGUAGE FlexibleContexts, FlexibleInstances #-} | |
import Data.Kind | |
import Data.Singletons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# serialize-postgresql-db-structure.pl | |
# (see bottom of this script for license and usage info) | |
use v5.10; use warnings; use strict; use autodie qw(:all); | |
use utf8; no warnings 'utf8'; | |
use Encode qw(decode_utf8); | |
use Pod::Usage; | |
use Getopt::Long; | |
use Scalar::Util qw(openhandle); | |
use List::Util qw(first); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack script | |
--resolver=lts-12.12 | |
--package=hspec | |
-} | |
-- See for details: https://blog.jle.im/entry/introduction-to-singletons-1.html | |
{-# LANGUAGE GADTs, DataKinds, KindSignatures, RankNTypes, TypeFamilies #-} | |
{-# LANGUAGE PolyKinds, ConstraintKinds #-} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# A script that helps to switch [Matrix] notifications for a room | |
# to "mentions only" mode from CLI. | |
# | |
# Author: Viacheslav Lotsmanov | |
# License: Public Domain | |
# | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack script --resolver=lts-10.2 | |
--package=base-unicode-symbols | |
--package=jack | |
-} | |
{-# OPTIONS_GHC -threaded #-} | |
{-# LANGUAGE UnicodeSyntax #-} | |
import Prelude.Unicode | |
import Control.Arrow | |
import Sound.JACK.Audio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stretch | |
RUN apt-get update -y \ | |
&& apt-get install -y --allow-unauthenticated \ | |
git vim libipc-system-simple-perl libautodie-perl curl wget parallel \ | |
postgresql-server-dev-9.6 libssl-dev libpcre2-dev libpcre3-dev \ | |
pkg-config icu-devtools libicu-dev libxml2-dev \ | |
libx11-dev libxtst-dev libxrandr-dev libxinerama-dev \ | |
rsyslog locales \ | |
&& sed -i -e \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
MaybeKind = enum Just, Nothing | |
Maybe[T] = object | |
case kind: MaybeKind | |
of Just: value: T | |
of Nothing: discard | |
EitherKind = enum Left, Right | |
Either[L, R] = object | |
case kind: EitherKind |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack runghc --resolver=lts-9.6 --install-ghc --package=unix | |
{-# LANGUAGE UnicodeSyntax #-} | |
{-# LANGUAGE PackageImports #-} | |
import "base" Control.Monad (forever) | |
import "base" Control.Concurrent (threadDelay) | |
import "unix" System.Posix.Signals | |
(Handler (Catch), installHandler, sigHUP, sigINT, sigTERM, sigPIPE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6.c; | |
close $*IN; | |
my $HOME := IO::Path.new: '/home/unclechu'; | |
my $BINDIR := $HOME.child: '.local/bin'; | |
my $LOCKFILE := %*ENV{'HOME'}.IO.child: '.kbd.pl6.lock'; | |
sub MAIN( Bool :f(:$force) = False | |
, Bool :v(:$verbose) = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z $1 ]] || [[ -z $2 ]]; then | |
echo Usage: "$(basename -- "$0")" \ | |
SOURCE-VOLUME-ID DESTINATION-VOLUME-ID 1>&2 | |
exit 1 | |
fi | |
docker run --rm -it -v "$1:/vol-src" -v "$2:/vol-dst" alpine \ | |
ash -c 'cp -r /vol-src/* /vol-dst/' || exit $? |