Skip to content

Instantly share code, notes, and snippets.

View binarin's full-sized avatar

Alexey Lebedeff binarin

  • Almere, The Netherlands
View GitHub Profile
@binarin
binarin / script-template.sh
Created December 27, 2020 06:12 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
error: while evaluating the attribute 'buildCommand' of the derivation 'vm-test-run-boot-bios-cdrom' at /home/binarin/personal-workspace/nixpkgs-procps-systemd/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute 'testScript' of the derivation 'nixos-test-driver-boot-bios-cdrom' at /home/binarin/personal-workspace/nixpkgs-procps-systemd/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute 'sources' of the derivation 'nixos-18.09pre-git-x86_64-linux.iso' at /home/binarin/personal-workspace/nixpkgs-procps-systemd/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute 'src' of the derivation 'isolinux.cfg' at /home/binarin/personal-workspace/nixpkgs-procps-systemd/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute 'text' of the derivation 'isolinux.cfg-in' at /home/binarin/personal-workspace/nixpkgs-procps-systemd/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating the attribute 'activationScript'
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
import Control.Monad.Reader.Class
import GHC.ST
package main
import (
"encoding/json"
"io"
"os"
"fmt"
)
func main() {
#!/usr/bin/env bash
set -euo pipefail
dump_iface=br-mgmt
# keep this amount of logs prior to each accident
keep_minutes=5
# where to store tcpdump's
this_host=$(hostname)
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 6c3eb98..ee29a14 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -93888,17 +93888,17 @@ self: {
"http-client-tls_0_3_0" = callPackage
({ mkDerivation, base, bytestring, connection, data-default-class
- , hspec, http-client, http-types, network, tls
+ , hspec, http-client_0_5_1, http-types, network, tls
#!/usr/bin/env bash
# minikube'd CCP rabbit
set -eu
set -o pipefail
main() {
case "$1" in
init)
step ensure-minikube-running
step ensure-registry
xargs -0 rabbitmqctl eval <<EOF
Prop = fun(K, L) -> proplists:get_value(K, L) end,
List = rabbit_amqqueue:list(<<"/">>),
QName = fun (Q) -> {resource, _VHost, queue, Name} = element(2, Q), Name end,
QPid = fun(Q) -> element(7, Q) end,
LocalList = lists:filter(fun (It) -> node(QPid(It)) =:= node() end , List),
Noop = make_ref(),
{ok, InterestingRe} = re:compile(<<"^(\\w*notifications\\.(error|info|warn)|[a-z]+)$">>),
IsNameInteresting = fun(Q) ->
case re:run(QName(Q), InterestingRe) of
-module(test).
-define(SERVER_CERT, <<"-----BEGIN CERTIFICATE-----
MIIC4TCCAcmgAwIBAgIBATANBgkqhkiG9w0BAQsFADATMREwDwYDVQQDDAhNeVRl
c3RDQTAeFw0xNjA1MTkxMTQ0MzVaFw0xNzA1MTkxMTQ0MzVaMCQxETAPBgNVBAMM
CGlzaGFtYWVsMQ8wDQYDVQQKDAZzZXJ2ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQCzPcdvoQh+yLeRt8w/FrZY3EOxQL3lMNgcWzpuq3AsYdK1wZmH
MND+ZGMs/QqxYnJBxbRcVJiCD2IeVKD3UWF38UljQFJfb6VYWS/bTWltsaRcuiRI
NzC2FZwy3buG0aJXnJA/qEwhem1xfGMRYuhm6+QIR9jAwH1AQRw6go0Z1nvzW1EK
cYuDUsYE+JIUoo7GafBurTiau6RD4zVlU9GI8+P78yf9k3EgilFpqsbPXvIqJIyE
#!/usr/bin/env bash
set -ex
run-ctl() {
RABBITMQ_LOG_BASE=./logs RABBITMQ_MNESIA_BASE=./mnesia RABBITMQ_NODENAME=dead-user-test@localhost RABBITMQ_NODE_PORT=11915 ERL_LIBS=./deps ./scripts/rabbitmqctl "$@"
}
run-server() {
RABBITMQ_LOG_BASE=./logs RABBITMQ_MNESIA_BASE=./mnesia RABBITMQ_NODENAME=dead-user-test@localhost RABBITMQ_NODE_PORT=11915 ERL_LIBS=./deps ./scripts/rabbitmq-server
}