Skip to content

Instantly share code, notes, and snippets.

View chrissound's full-sized avatar

Chris Stryczynski chrissound

View GitHub Profile
#!/bin/sh
string="abc\nxyz"
case $string in
(*[[:blank:]]*) echo "string contains at least one character classified as blank";;
(*[[:space:]]*) echo "string contains at least one character classified as whitespace (but not blank)";;
(*) echo no character classified as whitespace;;
esac
@chrissound
chrissound / gist:6fcea2723e7092555e8afc35e2d1f635
Created February 5, 2021 16:40
no pkg-config found nix haskell no uhc found
nix build
builder for '/nix/store/8dlqn03dq7xx7nlq6m0p6i2d19jvk7fb-HaskellNixCabalStarter-0.1.0.0.drv' failed with exit code 1; last 10 log lines:
/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1/bin/ld.gold
No pkg-config found
Using runghc version 8.6.5 found on system at:
/nix/store/wrghpsajnhd55blll01zw5wiw5vwar84-ghc-8.6.5/bin/runghc
Using strip version 2.31 found on system at:
/nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin/strip
Using tar found on system at:
/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin/tar
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "b47b186051a695a47d630c2c1660dc93",
"packages": [
{
"name": "cakephp/collection",
paths:
migrations: '%%PHINX_CONFIG_DIR%%/db/migrations'
seeds: '%%PHINX_CONFIG_DIR%%/db/seeds'
environments:
default_migration_table: phinxlog
default_environment: development
development:
adapter: postgresql
host: 172.17.0.1
@chrissound
chrissound / ghcid.sh
Last active April 22, 2020 21:41
Hacky but effective navigate to ghcid error with vim.. Might fail with spaces.
ghcid -o /tmp2/err.ghcid --command='cabal v2-repl app'
-- Logs begin at Sat 2019-08-03 15:24:08 BST, end at Sat 2020-02-22 12:29:47 GMT. --
Feb 22 00:24:04.458181 blueberry kernel: Linux version 4.19.102 (nixbld@localhost) (gcc version 8.3.0 (GCC)) #1-NixOS SMP Wed Feb 5 14:43:55 UTC 2020
Feb 22 00:24:04.458198 blueberry kernel: Command line: BOOT_IMAGE=(hd3,gpt4)/nix/store/znwl3qdisc41jqhyyc0gdw1p4bzhw0k8-linux-4.19.102/bzImage systemConfig=/nix/store/ibbrx8nprsqpk05nzfdr2iws9i3pqfhc-nixos-system-blueberry-19.09.2070.b9cb3b2fb2f init=/nix/store/ibbrx8nprsqpk05nzfdr2iws9i3pqfhc-nixos-system-blueberry-19.09.2070.b9cb3b2fb2f/init loglevel=4
Feb 22 00:24:04.458208 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Feb 22 00:24:04.458216 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Feb 22 00:24:04.458224 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Feb 22 00:24:04.458232 blueberry kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Feb 22 00:24:04.458241 blue
-- Logs begin at Sat 2019-08-03 15:24:08 BST, end at Sat 2020-02-22 12:29:47 GMT. --
Feb 22 00:24:04.458181 blueberry kernel: Linux version 4.19.102 (nixbld@localhost) (gcc version 8.3.0 (GCC)) #1-NixOS SMP Wed Feb 5 14:43:55 UTC 2020
Feb 22 00:24:04.458198 blueberry kernel: Command line: BOOT_IMAGE=(hd3,gpt4)/nix/store/znwl3qdisc41jqhyyc0gdw1p4bzhw0k8-linux-4.19.102/bzImage systemConfig=/nix/store/ibbrx8nprsqpk05nzfdr2iws9i3pqfhc-nixos-system-blueberry-19.09.2070.b9cb3b2fb2f init=/nix/store/ibbrx8nprsqpk05nzfdr2iws9i3pqfhc-nixos-system-blueberry-19.09.2070.b9cb3b2fb2f/init loglevel=4
Feb 22 00:24:04.458208 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Feb 22 00:24:04.458216 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Feb 22 00:24:04.458224 blueberry kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Feb 22 00:24:04.458232 blueberry kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Feb 22 00:24:04.458241 blue
nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
=================================== FAILURES ===================================
__________ EnsurePKSortableTest.test_exception_persistent_flush_py3k ___________
Traceback (most recent call last):
File "/nix/store/brzp6la0zrkzri7bpj6jwla0rab82d20-python3.5-SQLAlchemy-1.3.6/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 1631, in _sort_states
persistent_sorted = sorted(persistent, key=lambda q: q.key[1])
TypeError: unorderable types: MyNotSortableEnum() < MyNotSortableEnum()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
evaluating file '/nix/store/kxb7xnbpc4g1gv2q22l4lmyqyfyvi2l8-nix-2.1.3/share/nix/corepkgs/derivation.nix'
evaluating file '/nix/store/8pr8jncqj84x0gp8315d5l18r92g3q6i-v1.1.tar.gz/default.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/default.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/lib/minver.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/pkgs/top-level/impure.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/pkgs/top-level/default.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/pkgs/stdenv/booter.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/lib/default.nix'
evaluating file '/nix/store/613yvbmglf0pzd3ly1cxx4jdc23s9rdg-nixos-18.09.2574.a7e559a5504/nixos/lib/fixed-points.nix'
evaluating fi