Skip to content

Instantly share code, notes, and snippets.

View hangy's full-sized avatar

hangy hangy

View GitHub Profile
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;
@JustinMcNamara74
JustinMcNamara74 / UserPermissions.sql
Last active May 1, 2024 21:49
#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
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active June 3, 2024 07:38
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
@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 )
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
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
@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