Skip to content

Instantly share code, notes, and snippets.

View 56500-build
bazel-watcher
boringssl
cadvisor
cide
cni-plugins
deepin.dbus-factory
deepin.dde-api
deepin.dde-daemon
deepin.deepin-desktop-base
deepin.deepin-desktop-schemas
View keybase.md

Keybase proof

I hereby claim:

  • I am kalbasit on github.
  • I am ylcodes (https://keybase.io/ylcodes) on keybase.
  • I have a public key ASAYUIH9miRsfDVHaDMbY6r697SH1Kz-o86NFt-c5oEfXgo

To claim this, I am signing this object:

View gist:2ca595cf1a8b05d737bdcacb20da51ca
nix-env -f '<nixpkgs>' -iE '(terraform.withPlugins (ps: [
ps.aws
ps.github
ps.null
ps.template
]))'
@kalbasit
kalbasit / pcscd.log
Created Jan 24, 2019
YubiKey 5 issues
View pcscd.log
Jan 23 21:12:30 hades systemd[1]: Started PCSC-Lite daemon.
Jan 23 21:12:30 hades pcscd[29501]: 00000000 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
Jan 23 21:12:30 hades pcscd[29501]: 00000017 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0406:libudev:0:/dev/bus/usb/001/010)
Jan 23 21:12:30 hades pcscd[29501]: 00000025 readerfactory.c:376:RFAddReader() Yubico Yubikey 4 U2F+CCID init failed.
Jan 23 21:12:30 hades pcscd[29501]: 00128627 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
Jan 23 21:12:30 hades pcscd[29501]: 00000007 readerfactory.c:1106:RFInitializeReader() Open Port 0x200001 Failed (usb:0a5c/5832:libudev:0:/dev/bus/usb/001/004)
Jan 23 21:12:30 hades pcscd[29501]: 00000001 readerfactory.c:376:RFAddReader() Broadcom Corp 5880 [Broadcom USH] (0123456789ABCD) init failed.
View aws.nix
resources = {
ec2SecurityGroups = {
ssh-in = {
inherit accessKeyId region;
description = "Allow incoming SSH connection from anywhere";
rules = [
{ fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "0.0.0.0/0"; }
# TODO(low): https://github.com/NixOS/nixops/issues/683
# {fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "::/0"; }
View aws.nix
resources = {
ec2SecurityGroups = rec {
ssh-in = {
inherit accessKeyId region;
description = "Allow incoming SSH connection from anywhere";
rules = [
{ fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "0.0.0.0/0"; }
# TODO(low): https://github.com/NixOS/nixops/issues/683
# {fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "::/0"; }
View aws.nix
{
resources.ec2SecurityGroups.ssh-in = {
inherit accessKeyId region;
description = "Allow incoming SSH connection from anywhere";
rules = [
{ fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "0.0.0.0/0"; }
# TODO(low): https://github.com/NixOS/nixops/issues/683
# {fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "::/0"; }
];
};
View nix-repl.sh-session
λ  nix repl
Welcome to Nix version 2.1.3. Type :? for help.
nix-repl> pkgs = import <nixpkgs> {}
nix-repl> transform = with pkgs; with pkgs.lib; let transformType = with types; let list3 = elemType: addCheck (listOf elemType) (l: length l != 3); in uniq (list3 (list3 float)); in mkOption { type = transformType; description = "3×3 matrix of floating point numbers"; default = []; example = [ [ 0.6 0.0 0.0 ] [ 0.0 0.6 0.0 ] [ 0.0 0.0 1.0 ] ]; }
View configuration.nix
# neither A nor B is working. I don't see this in the activation script or under `result/etc/`
{
# A
system.activationScripts = {
nixpkgsPin = {
text = ''
ln -sfn ${pinnedNixpkgs} /etc/nixpkgs
'';
deps = [];
View shell.nix
# This allows overriding nixpkgs by passing `--arg pkgs ...`
{ pkgs ? import ./devtools/lib/nix/nixpkgs.nix {}
, lib ? pkgs.lib
}:
with pkgs;
with lib;
let