Skip to content

Instantly share code, notes, and snippets.

View hangy's full-sized avatar

hangy hangy

View GitHub Profile
@eliottness
eliottness / README.md
Last active October 30, 2026 01:36
Bitwarden SSH agent in WSL2 via a systemd user service (socat + npiperelay) — with the gotchas that make ssh-add hang

Bitwarden SSH agent in WSL2 (via systemd)

Use the SSH keys stored in your Windows Bitwarden Desktop vault from inside WSL2 — ssh, git, ssh-add, etc. — managed by a systemd user service instead of a fragile .zshrc snippet.

This bridges the Windows OpenSSH-agent named pipe that Bitwarden exposes (\\.\pipe\openssh-ssh-agent) to a Unix socket inside WSL using npiperelay + socat.

@AveYo
AveYo / . Pitch Black Theme.reg
Last active November 5, 2026 12:23
Pitch Black Theme.reg - now for Ctrl+Alt+Del (and logon on 11) as well - revised 2026-05-15
Windows Registry Editor Version 5.00
; Pitch Black Theme with Gray Accent preset by AveYo
; for Ctrl+Alt+Del, Logon, Taskbar, Start Menu, Action Center (10 & 11)
; revised 2026.05.15
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
"AccentColorMenu"=dword:ff000000 ; Window borders and titlebar [black]
"StartColorMenu"=dword:ff000000 ; Modals in UWP ex. Apply new refresh rate in 10 [black]
"AccentPalette"=hex:\
@Pablohn26
Pablohn26 / README.md
Created March 5, 2021 14:16
Migrate from Home Assistant container (docker-compose) to Home Assistant Supervised

We want to migrate from Home Assistant Container (docker-compose.yml) to Home Assistant Supervised.

The main idea is to copy the /config file from docker container to main Home Assistant Supervised config folder (/usr/share/hassio/homeassistant by default)

To do so, first we need the path to the source /config folder, in my case /root/compose/ha/config

Then we need to know the path to the destination /config folder, /usr/share/hassio/homeassistant using Home Assistant Supervised default installation

The steps are:

  1. Install Home Assistant Supervised
@gricard
gricard / webpack4upgrade.md
Last active October 5, 2026 02:37
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@a4099181
a4099181 / Convert-ToPackageReference.ps1
Last active February 18, 2021 07:00
Converts packages.config into PackageReference at *.csproj project file. Requires XSLT stylesheet available as second file in the gist.
Function Convert-ToPackageReference
{
Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri,
[String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/cdd0fb31efd70c4c0f8c86ddb314de86ab8972e8/Convert-ToPackageReference.xsl",
[String] $resultsFile = [System.IO.Path]::GetTempFileName() )
Process {
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform
$xslt.Load( $stylesheetUri )
$xslt.Transform( $inputUri, $resultsFile )
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active October 21, 2026 04:11
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@JustinMcNamara74
JustinMcNamara74 / UserPermissions.sql
Last active January 30, 2025 15:46
#MSSQL List all user permissions/roles for all users
/*
********************************************************************************************************************************
Credits: @Jeremy
Posted: http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database
********************************************************************************************************************************
Security Audit Report
1) List all access provisioned to a sql user or windows user/group directly
2) List all access provisioned to a sql user or windows user/group through a database or application role
3) List all access provisioned to the public role
@bzbetty
bzbetty / QueueJob
Created February 7, 2013 21:14
[Archived]
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.Framework.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;