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
| git clone https://github.com/llvm/llvm-project/ ./llvm | |
| cd llvm && vim shell.nix | |
| nix-shell | |
| mkdir -p ./build && cd ./build | |
| cmake $cmakeFlags -G Ninja ../llvm | |
| time ninja |
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
| /// Apply closure function preserving self instance | |
| pub trait TryTap: Sized { | |
| fn try_tap<E>(self, f: impl FnOnce(&Self) -> Result<(), E>) -> Result<Self, E>; | |
| } | |
| impl<T> TryTap for T { | |
| fn try_tap<E>(self, f: impl FnOnce(&Self) -> Result<(), E>) -> Result<Self, E> { | |
| f(&self)?; | |
| Ok(self) | |
| } |
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
| pub trait AsyncResult<T, E> { | |
| async fn and_then_async<U, F: AsyncFnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E>; | |
| } | |
| impl<T, E> AsyncResult<T, E> for std::result::Result<T, E> { | |
| #[inline] | |
| async fn and_then_async<U, F: AsyncFnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> { | |
| match self { | |
| Ok(t) => op(t).await, | |
| Err(e) => Err(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
| # Source: https://unboundplanet.com/nova/the-cleanest-macos-tahoe-macos-26-mac-hackintosh-vm/ | |
| # List all avialable installers | |
| softwareupdate --list-full-installers | |
| # Fetch the latest installer | |
| softwareupdate --fetch-full-installer --full-installer-version 26.0.1 | |
| # Check if installer has been fetched | |
| ls -lh /Applications | grep -i "tahoe" |
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
| { | |
| lib, | |
| config, | |
| pkgs, | |
| ... | |
| }: let | |
| cfg = config.kolyma.runners; | |
| user = { | |
| users.users.${cfg.user} = { |
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
| { | |
| lib, | |
| config, | |
| inputs, | |
| ... | |
| }: let | |
| cfg = config.kolyma.www; | |
| bnest = mod: lib.strings.splitString "." mod; |
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
| { | |
| stdenv, | |
| lib, | |
| libiconv, | |
| fetchFromGitHub, | |
| gcc, | |
| llvmPackages, | |
| appstream, | |
| appstream-glib, | |
| cargo, |
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
| -- Algebraic data type definition | |
| data Tree a = Empty | Node (Tree a) a (Tree a) deriving (Show) | |
| -- Insertion function | |
| insert :: (Ord a) => a -> Tree a -> Tree a | |
| insert x Empty = Node Empty x Empty | |
| insert x (Node left v right) | |
| | x < v = Node (insert x left) v right | |
| | otherwise = Node left v (insert x right) |
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
| { | |
| lib, | |
| stdenv, | |
| jre8, | |
| curl, | |
| ccid, | |
| fetchurl, | |
| pcsclite, | |
| pcsc-tools, | |
| writeShellScript, |
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
| { | |
| homeConfigurations = { | |
| # ___ __ | |
| # / | ____ ____ / /__ | |
| # / /| | / __ \/ __ \/ / _ \ | |
| # / ___ |/ /_/ / /_/ / / __/ | |
| # /_/ |_/ .___/ .___/_/\___/ | |
| # /_/ /_/ | |
| # For all my current OSX machines | |
| "sakhib@apple" = home-manager.lib.homeManagerConfiguration { |
NewerOlder