Skip to content

Instantly share code, notes, and snippets.

View anpin's full-sized avatar
:shipit:
Working from home

Pavel Anpin anpin

:shipit:
Working from home
View GitHub Profile
@anpin
anpin / falcon-default.nix
Created November 20, 2024 15:00 — forked from ravloony/falcon-default.nix
Falcon package
{ stdenv, dpkg, fetchurl, openssl, libnl, buildFHSUserEnv,... }:
stdenv.mkDerivation {
name = "falcon-sensor";
version = "4.18.0-6402";
arch = "amd64";
src = fetchurl {
url = "https://storage.googleapis.com/company-tools/falcon-sensor/falcon-sensor_4.18.0-6402_amd64.deb";
sha512 = "dc41cfe0232124480abdcf456df9a3bd6cab62716bc5beea089fbf99ac2e29bf1e1a44676591a71eeb35afe7f25e495b53ede007cfc15dcbf47df7ec0a016098";
};
@anpin
anpin / README.md
Created June 16, 2024 10:58 — forked from tetele/README.md
ESPHome config - Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant

Introduction

The purpose of this ESPHome config is to be able to use the Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant.

Features

  • wake word, push to talk and continuous conversation support
  • response playback
  • service exposed in HA to start and stop the voice assistant from another device/trigger
  • visual feedback of the recording/success/error status via the Luxe's onboard LED
@anpin
anpin / configuration.nix
Created April 9, 2024 10:57 — forked from clamydo/configuration.nix
Minimal example how to pass a sops-nix secret into a systemd-nspawn container via systemd's credential system.
{ config, lib, pkgs, ... }:
{
imports = [
${builtins.fetchTarball
"https://github.com/Mic92/sops-nix/archive/master.tar.gz"
}/modules/sops"
];
users = {
@anpin
anpin / authentik.nix
Created January 5, 2024 10:12
Authentik NixOS module
{config, pkgs, lib, ... }:
let
cfg = config.services.authentik;
databaseActuallyCreateLocally = cfg.database.createLocally && cfg.database.host == "/run/postgresql";
inherit (pkgs)
authentik
;
inherit (lib)
mkIf
@anpin
anpin / default.nix
Last active August 15, 2023 06:56
drduh/YubiKey-Guide adapted for flakes
# yubikey-installer.nix
{ config, lib, pkgs, modulesPath, ... }:
with pkgs;
let
# src = fetchGit "https://github.com/drduh/YubiKey-Guide";
src = fetchFromGitHub {
owner = "drduh";
repo = "YubiKey-Guide";
rev = "master";
sha256 = "sha256-N76e/yhXUoWUK6EQZHGyTs0DcbZqAlI5xtQMf0squR8=";
@anpin
anpin / kiosk.ps1
Last active August 4, 2023 04:25
Simple PS script to configure locally hosted nodejs web-kiosk on windows 10 pro with FTP to update content
# Variables
$serverPort = 8080 # Change to the desired port for your Node.js server
$nodePort = 8081 # Change to the desired port for your Node.js server
$kioskURL = "http://localhost:$serverPort" # The URL that the kiosk browser will open
$siteName = "InteractiveKiosk"
$sitePath = "IIS:\Sites\$siteName"
$physicalPath = "C:\$siteName"
$contentPath = "$physicalPath/content"
$ftpGroup = "IISFTP"
@anpin
anpin / repro.sh
Created June 20, 2023 07:30
paket git dependency hangs
#!/bin/sh
mkdir -p paket-repro && cd paket-repro
dotnet new tool-manifest
dotnet tool install paket
echo -e 'git https://github.com/anpin/Elmish.Bridge ns2.0 build: "./build.sh", Packages: /nugets/, OS: mono\n nuget Elmish.Bridge.RPC' > paket.dependencies
dotnet paket update -v
@anpin
anpin / podman-shell.nix
Created February 16, 2023 08:09 — forked from adisbladis/podman-shell.nix
Use podman within a nix-shell
{ 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; }];
# };
@anpin
anpin / gist:1eed9afd016a3a02109f4f1357e5b4d9
Created October 2, 2022 10:15
python310Packages.openapi-core build log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@anpin
anpin / .gitlab-ci.yml
Created August 18, 2021 10:12 — forked from ashalkhakov/.gitlab-ci.yml
Running .NET 3.5 CF builds under Docker for Windows
# this is the GitLab-CI file for building the image
variables:
CURRENT_IMAGE_TAG: rfid-applied/netcf35_build_environment:dev
stages:
- dockerize
dockerize:
stage: dockerize
script: