Skip to content

Instantly share code, notes, and snippets.

@alunduil
alunduil / homealunduil.cachepre-commitpre-commit.log
Created October 24, 2020 08:59
/home/alunduil/.cache/pre-commit/pre-commit.log
### version information
```
pre-commit version: 2.6.0
sys.version:
3.7.6 (default, Dec 18 2019, 19:23:55)
[GCC 9.2.0]
sys.executable: /home/alunduil/Projects/infrastructure/zfs-replicate/.direnv/python-3.7.6/bin/python3
os.name: posix
sys.platform: linux
@alunduil
alunduil / stdin
Created October 17, 2020 08:36
stdin
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/alunduil/.cache/pre-commit/repopgzbqzre/py_env-python3/bin/python3.7', '/home/alunduil/.cache/pre-commit/repopgzbqzre/py_env-python3/bin/pip', 'install', '.')
return code: 1
expected return code: 0
stdout:
Processing /home/alunduil/.cache/pre-commit/repopgzbqzre
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
@alunduil
alunduil / psuedocode.md
Created October 4, 2020 16:04
Psuedocode Example

Problem Statement

Write psuedocode for the following program output.

Enter number of inputs:7
Enter inputs: 10 2 10 5 1 1 100
10, Occurence:2
1, Occurence:2
@alunduil
alunduil / stdin
Created July 31, 2020 17:25
stdin
Check for added large files..............................................Passed
Check for merge conflicts................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Fix requirements.txt.....................................................Passed
Trim Trailing Whitespace.................................................Passed
black....................................................................Passed
mypy.....................................................................Passed
isort....................................................................Passed
Script started on 2020-05-23 09:28:52-07:00 [TERM="screen-256color" TTY="/dev/pts/10" COLUMNS="294" LINES="70"]
alunduil@odin citybound % ls -l
total 21548
-rw-r--r-- 1 alunduil users 22095983 May 23 08:50 citybound-v0.1.2-822-g33769a7-linux.tar.gz
-rw-r--r-- 1 alunduil users 0 May 23 09:28 typescript
alunduil@odin citybound % tar -zxvf citybound-v0.1.2-822-g33769a7-linux.tar.gz
citybound-v0.1.2-822-g33769a7
alunduil@odin citybound % ./citybound-v0.1.2-822-g33769a7
zsh: no such file or directory: ./citybound-v0.1.2-822-g33769a7
alunduil@odin citybound % ls -l
@alunduil
alunduil / AlgorithmR.hs
Created April 8, 2020 05:31
AlgorithmR.hs
module AlgorithmR
( algorR
)
where
algorR :: Num a => Int -> Int -> [a] -> ([a], [a])
algorR = algorR' ([], [])
algorR' :: Num a => ([a], [a]) -> Int -> Int -> [a] -> ([a], [a])
algorR' (ys, zs) _ 0 _ = (ys, zs)
@alunduil
alunduil / stdin
Created March 26, 2020 04:42
stdin
+ '[' -e Makefile ']'
+ '[' -e zfs-replicate.cabal ']'
+ hlint src test
No hints
+ cabal new-clean
+ cabal new-configure -O0 --enable-tests --enable-benchmarks
'cabal.project.local' file already exists. Now overwriting it.
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O0
In order, the following would be built (use -v for more details):
@alunduil
alunduil / etcos-release
Created March 26, 2020 03:40
/etc/os-release
NAME=NixOS
ID=nixos
VERSION="20.03beta695.b2935fbecea (Markhor)"
VERSION_CODENAME=markhor
VERSION_ID="20.03beta695.b2935fbecea"
PRETTY_NAME="NixOS 20.03 (Markhor)"
LOGO="nix-snowflake"
HOME_URL="https://nixos.org/"
DOCUMENTATION_URL="https://nixos.org/nixos/manual/index.html"
SUPPORT_URL="https://nixos.org/nixos/support.html"
@alunduil
alunduil / stdin
Created March 26, 2020 03:29
stdin
+ '[' -e Makefile ']'
+ '[' -e zfs-replicate.cabal ']'
+ hlint src test
No hints
+ cabal v2-clean
+ cabal v2-configure -O0 --enable-tests --enable-benchmarks
'cabal.project.local' file already exists. Now overwriting it.
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O0
In order, the following would be built (use -v for more details):
@alunduil
alunduil / .githookspre-commit
Created March 26, 2020 03:25
.git/hooks/pre-commit
#!/usr/bin/env bash
set -e
set -x
if [ -e Makefile ]; then
make lint
make check
elif [ -e zfs-replicate.cabal ]; then
hlint src test