Skip to content

Instantly share code, notes, and snippets.

View doggy8088's full-sized avatar
🙂
Giving is a reward in itself

Will 保哥 doggy8088

🙂
Giving is a reward in itself
View GitHub Profile
@doggy8088
doggy8088 / ODP.NET README.md
Last active May 12, 2020 05:31
Oracle.EntityFrameworkCore & Oracle.ManagedDataAccess.Core NuGet package release notes

下載 Release Notes 的方式

$version = '2.19.70'
nuget.exe install Oracle.EntityFrameworkCore -Version $version -OutputDirectory out
code out\Oracle.EntityFrameworkCore.$version\readme.txt

nuget.exe install Oracle.ManagedDataAccess.Core -Version $version -OutputDirectory out
code out\Oracle.ManagedDataAccess.Core.$version\readme.txt
@doggy8088
doggy8088 / WSLConfig.md
Created July 28, 2020 07:17
WSL 2 的 .wslconfig 設定檔說明
  • 編輯 %UserProfile%\.wslconfig 檔案

    • Command Prompt

      notepad %UserProfile%\.wslconfig
    • Windows PowerShell

@doggy8088
doggy8088 / MVC5_Views_Shared_Error.md
Last active September 30, 2020 07:20
VS2019 預設 MVC5 專案範本的 Views\Shared\Error.cshtml 錯誤修正
  • 預設內容

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="viewport" content="width=device-width" />
        <title>錯誤</title>
@doggy8088
doggy8088 / Oracle.ManagedDataAccess_v19.11.0_README.md
Created March 16, 2021 03:42
Oracle.ManagedDataAccess NuGet Package 19.11.0 README

Oracle.ManagedDataAccess NuGet Package 19.11.0 README

Release Notes: Oracle Data Provider for .NET, Managed Driver

March 2021

This document provides information that supplements the Oracle Data Provider for .NET (ODP.NET) documentation. You have downloaded Oracle Data Provider for .NET from Oracle, the license agreement to which is available at

function New-RandomPassword {
param(
[Parameter()]
[int]$MinimumPasswordLength = 8,
[Parameter()]
[int]$MaximumPasswordLength = 12,
[Parameter()]
[switch]$ConvertToSecureString
)
$length = Get-Random -Minimum $MinimumPasswordLength -Maximum $MaximumPasswordLength
@doggy8088
doggy8088 / en-zh-bookmarklet.user.js
Created October 3, 2021 06:48
中、英文網頁切換的瀏覽器書籤小工具 (Tampermonkey Userscript)
// ==UserScript==
// @name 中、英文網頁切換的瀏覽器書籤小工具
// @namespace https://blog.miniasp.com/
// @version 0.1
// @description 按下 Alt+s 就會自動將目前網頁切換至中文或英文版
// @license MIT
// @homepage https://blog.miniasp.com/
// @homepageURL https://blog.miniasp.com/
// @website https://www.facebook.com/will.fans
// @source https://github.com/miniasp/en-zh-bookmarklet
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
# winget parameter completion
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new()
$Local:word = $wordToComplete.Replace('"', '""')
$Local:ast = $commandAst.ToString().Replace('"', '""')
winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
# 移除兩個不實用的 Cmdlet Aliases
If (Test-Path Alias:curl) {Remove-Item Alias:curl}
If (Test-Path Alias:wget) {Remove-Item Alias:wget}
# 快速開啟 c:\windows\system32\drivers\etc\hosts 檔案
function hosts { notepad c:\windows\system32\drivers\etc\hosts }
# 快速產生一組亂數密碼 (預設會產生 10 個字元的密碼)
function New-Password {
<#