Skip to content

Instantly share code, notes, and snippets.

View siers's full-sized avatar
:octocat:

Raitis Veinbahs siers

:octocat:
  • Basel, Switzerland
View GitHub Profile
@siers
siers / NaiveCopy.hs
Created January 4, 2024 12:51
Naive directory tree copy with full contents in memory and using recursion schemes (cata/anaM)
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UnicodeSyntax #-}
@siers
siers / gist:63df7694c42062349c57c89969a9fbc7
Created August 27, 2024 14:08
nix-shell --run 'python -m uploadserver' oneliner
nix-shell -E 'with (import <nixpkgs> {}); with python3; mkShell { buildInputs = [ (withPackages (p: [(pkgs.buildPythonPackage rec { pname = "uploadserver"; version = "5.2.1"; src = fetchPypi { inherit pname version; hash = "sha256-qp2xkzLvnrnx8dHZpwlF3RjRg8jYC7WAaVS4ltJFZaU="; }; })]) ) ]; }' --run "python -m uploadserver 65353"
# you're welcome