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
  • Earth
View GitHub Profile
using Crestron.SimplSharp;
using Crestron.SimplSharp.Scheduler;
namespace APES.SSharp.Light
{
public static partial class LightService
{
static ScheduledEventGroup _schedule = new ScheduledEventGroup("LightService");
static void ScheduleDuskOn(DateTime date)
{
string eventName = string.Format("dusk-{0}-{1}-{2}", date.Date, date.Month, date.Year);
@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:
@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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