Use this script to create a new AWS IoT Thing from the command line.
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
| #!/bin/bash | |
| # Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
| [[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; } | |
| [[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; } | |
| readonly parameterName="SlawekTestParam" | |
| readonly method="POST" |
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
| { config, lib, pkgs, ... }: | |
| with lib; | |
| { | |
| imports = | |
| [ | |
| <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> | |
| ./machine-config.nix | |
| ]; |
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
| { pkgs ? import <nixpkgs> {} }: | |
| let | |
| # To use this shell.nix on NixOS your user needs to be configured as such: | |
| # users.extraUsers.adisbladis = { | |
| # subUidRanges = [{ startUid = 100000; count = 65536; }]; | |
| # subGidRanges = [{ startGid = 100000; count = 65536; }]; | |
| # }; |
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
| :{ | |
| let bwAddress = "127.0.0.1" | |
| bwPort = 8000 | |
| bwLatency = 0.02 | |
| bwPreamble = [] | |
| bwTimestamp = BundleStamp | |
| :} | |
| -- TEMPO | |
| :{ |
Okay, I've got a need to build Firefox from source, and I'd like to do that on a remote machine, and then copy build result back to my laptop. With Nix, using bastion host. I'll note details of my successful adventure.
Here's the list of resources I've used actively:
- https://nixos.wiki/wiki/Distributed_build
- https://nixos.org/nix/manual/#conf-trusted-substituters and various other configuration parameters
- https://github.com/NixOS/nixpkgs/blob/release-19.09/nixos/modules/services/misc/nix-daemon.nix which contains mappings from Nix config names to NixOS config names (damn, they are different!)
Here's my setup:
-
2023-09-26 Казань. Митап по функциональному программированию в Казани Регистрация
Темы:
— про software transactional memory (STM) и том, какие проблемы она решает;
— как работать с иммутабельными данными удобно и без боли.
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
| # MIT License, see below | |
| # | |
| # These are some helpers for figuring out the derivations attributes of runtime | |
| # dependencies of a derivation, in particular the function `runtimeReport`. At | |
| # the bottom of the file you can see it used on `hello`. Spoiler: glibc is a | |
| # runtime dependency. | |
| # For more info see | |
| # | |
| # https://nmattia.com/posts/2019-10-08-runtime-dependencies.html |
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
| # This file is an example of overriding a GHC core Haskell library (like | |
| # bytestring, containers, text, unix, etc) when building a Haskell package. | |
| let default-nixpkgs = | |
| builtins.fetchTarball { | |
| # nixpkgs haskell-updates branch as of 2019/09/15. | |
| url = "https://github.com/NixOS/nixpkgs/archive/a51b3367ab6acc72630da0bad50ce14fa86996d0.tar.gz"; | |
| sha256 = "05d3jxxk5dxzs9b3nan16lhkrjnzf0bjd4xy66az86fsafnrr9rd"; | |
| }; | |
| in |