Skip to content

Instantly share code, notes, and snippets.

@kking124
kking124 / list-db-foreign-keys.sql
Created January 27, 2021 18:06
list database foreign keys
-- source: https://stackoverflow.com/questions/925738/how-to-find-foreign-key-dependencies-in-sql-server
SELECT
FK_Table = FK.TABLE_NAME,
FK_Column = CU.COLUMN_NAME,
PK_Table = PK.TABLE_NAME,
PK_Column = PT.COLUMN_NAME,
Constraint_Name = C.CONSTRAINT_NAME
FROM
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK
@kking124
kking124 / Dockerfile
Last active June 21, 2019 15:50
dockerfile to create a tor socks and http proxy using privoxy
FROM debian:stretch
LABEL maintainer=https://github.com/kking124 build=1.0.20190620 source=https://howto.biapy.com/en/debian-gnu-linux/servers/http/install-the-anonymizing-proxy-server-tor-on-debian
EXPOSE 8118 9050
RUN apt-get -y update && apt-get -y install lsb-release gnupg curl && \
echo deb http://deb.torproject.org/torproject.org stretch main > /etc/apt/sources.list.d/tor.list && \
echo deb-src http://deb.torproject.org/torproject.org stretch main >> /etc/apt/sources.list.d/tor.list && \
curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | apt-key add - && \
apt-get update && \
@kking124
kking124 / check-rollup.ps1
Last active March 3, 2017 06:03
Check to see if required rollup has been installed
<#
check-rollup.ps1
Author: kking124 (https://github.com/kking124)
Version: 1.0.3
Copyright 2017 kking124
LicenseL MIT (https://opensource.org/licenses/MIT)
#>
function Check-Rollup {
param ([Parameter(Mandatory=$true)][string] $Id, [switch] $Is32, [switch] $V2)
<#
@kking124
kking124 / configure-iis.ps1
Last active July 25, 2022 15:19
Configuration Script to Secure Public IIS Server
# configure-iis.ps1
# Version: 1.2
# Author: kking124 (https://github.com/kking124)
#
# Copyright 2016, 2017
#
# License: MIT
# .SYNOPSIS
# Tries to configure IIS as a minimal, secure installation on Windows Server 2008 and later
#