Skip to content

Instantly share code, notes, and snippets.

sdwh / web.config
Created April 16, 2022 06:26
IIS .NET Framework Web Config
<?xml version="1.0" encoding="utf-8"?>
<!-- the root web configuration file -->
Using a location directive with a missing path attribute
scopes the configuration to the entire machine. If used in
conjunction with allowOverride="false", it can be used to
prevent configuration from being altered on the machine
Administrators that want to restrict permissions granted to
sdwh / CreateTable.sql
Last active March 12, 2023 21:32
[SQLite - Examples] #sqlite
CREATE TABLE "DocDirectory" (
"DocPath" TEXT,
"DocDirType" TEXT,
"DocType" TEXT,
"DocNumber" TEXT,
"DocFileName" TEXT,
"DocTitle" TEXT,
"DocOwner" TEXT,
"DocOwnerDept" TEXT,
sdwh / applicationHost.config
Created April 16, 2022 06:47
IIS applicationHost.config
<?xml version="1.0" encoding="UTF-8"?>
IIS configuration sections.
For schema documentation, see
Please make a backup of this file before making any changes to it.
sdwh / machine.config
Created April 16, 2022 06:25
IIS Machine Config
<?xml version="1.0" encoding="UTF-8" ?>
Please refer to machine.config.comments for a description and
the default values of each configuration section.
For a full documentation of the schema please refer to
To improve performance, machine.config should contain only those
settings that differ from their defaults.
sdwh / Js-Ban-Right-Click.js
Created July 10, 2021 04:11
[JS Ban Right Click] #JS
window.onload = function () { document.oncontextmenu = function () { return false; } }
sdwh / getAnchorsByjQuery
Last active July 10, 2021 04:10
[JS Dom Manipulate] #JS
$.each($("a"), function(_, ele){ console.log(decodeURI(ele.text.trim()), ":", ele.href.trim())})
sdwh / AllowCORSAttribute.cs
Last active July 10, 2021 01:18
[MVC5 Attributes] #ASP.NET
// 允許其他網站 CROS Get Data from Action
using System.Web.Mvc;
namespace ProjectSpace.Filters
public class AllowCORSAttribute : ActionFilterAttribute
public override void OnActionExecuting(ActionExecutingContext filterContext)
sdwh / settings.json
Last active July 10, 2021 01:17
[VSCode Config]
// 編輯視窗文字大小
"editor.fontSize": 18,
// 終端機文字大小
"terminal.integrated.fontSize": 14,
// 介面放大比大 預設 0
"window.zoomLevel": 0.3,
"workbench.colorTheme": "Monokai",
"workbench.startupEditor": "newUntitledFile",
"workbench.iconTheme": "material-icon-theme",
sdwh / transfer-login.sql
Last active July 10, 2021 01:14
[SQL Server Transfer Logins Passwords] #SQLServer
USE master
IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL
DROP PROCEDURE sp_hexadecimal
CREATE PROCEDURE sp_hexadecimal
@binvalue varbinary(256),
@hexvalue varchar (514) OUTPUT
DECLARE @charvalue varchar (514)
sdwh / TLS12-Best-Setup-For-Windows.ps1
Created March 7, 2021 12:12
[TLS Setting For WIndows] #IIS #TLS
# Copyright 2019, Alexander Hass
# After running this script the computer only supports:
# - TLS 1.2
# Version 3.0.1, see CHANGELOG.txt for changes.
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'