Skip to content

Instantly share code, notes, and snippets.

View QuadmanSWE's full-sized avatar

David Söderlund QuadmanSWE

View GitHub Profile
@dhmacher
dhmacher / list-agent-job-ssis-steps.sql
Created February 9, 2021 19:57
List jobs, job steps and their SSIS packages and environments respectively.
SELECT j.[name] AS Job,
s.step_id AS Step,
s.step_name AS [Step name],
s.subsystem AS [Subsystem],
s.[command],
x2.p AS [SSIS path],
env.environment_name AS [Environment name]
FROM msdb.dbo.sysjobs AS j
INNER JOIN msdb.dbo.sysjobsteps AS s ON j.job_id=s.job_id
OUTER APPLY (
@ToMe25
ToMe25 / sftp.yaml
Last active December 14, 2022 14:13 — forked from jujhars13/sftp.yaml
A improved version of jujhars13s kubernetes pod example for atmoz/sftp.
# This kubernetes manifest for http://github.com/atmoz/sftp is made by ToMe25, based on a similar one by jujhars13.
#
# Usage:
# 1. Create the sftp namespace using `kubectl create namespace sftp`.
# 2. Copy your `~/.ssh/id_rsa.pub` file(can be generated with `ssh-keygen` if missing) to a new folder named `client_keys`.
# Also add the `id_rsa.pub` files of all other users you want to be able to log in without a password to this folder.
# 3. Create host keys for the sftp server in a new folder named `host_keys` by running `ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key`
# and `ssh-keygen -t ed25519 -f ssh_host_ed25519_key` in it.
# 4. Create a Kubernetes secret from the client keys by running `kubectl create secret generic sftp-client-public-keys -n sftp --from-file=client_keys`.
# 5. Create another Kubernetes secret from the host keys by running `kubectl create secret generic sftp-host-keys -n sftp --from-file=host_keys`.
@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

@kennwhite
kennwhite / powershell_command_urandom.js
Last active July 22, 2023 14:09
Powershell 1-liner to generate random n-byte key from Windows command line
// Windows equivalent to Linux/Mac: echo $(head -c 64 /dev/urandom | base64 | tr -d '\n')
// Get-Random in Windows 10/Server 2016 PowerShell uses a CSPRNG seed by default.
// Prior to PS 5.1, seed was system clock.
// For Win 10/2016+
powershell -command "[Convert]::ToBase64String((1..64|%{[byte](Get-Random -Max 256)}))"
// For Win 8.x/2012
powershell -command "$r=[byte[]]::new(64);$g=[System.Security.Cryptography.RandomNumberGenerator]::Create();$g.GetBytes($r);[Convert]::ToBase64String($r)"
@inammathe
inammathe / Invoke-DbUp.ps1
Created September 19, 2018 16:13
Runs scripts against a database using DbUp
param(
$TargetDatabase,
$PackagePath,
$TargetServer,
$JournalToSqlTable,
$ConnectionTimeout,
$ExecutionTimeout,
$Static_ScriptsDir,
$Sandpit_ScriptsDir,
$TestEnv_ScriptsDir,
@SvenAelterman
SvenAelterman / Configure-Sql2017RS.ps1
Last active May 8, 2024 09:52
PowerShell script to configure SQL Server 2017 Reporting Services
<#
#>
function Get-ConfigSet()
{
return Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_SSRS\v14\Admin" `
-class MSReportServer_ConfigurationSetting -ComputerName localhost
}
# Allow importing of sqlps module
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force