This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(workbook: ExcelScript.Workbook) { | |
// 取得使用中的儲存格和工作表。 | |
let originalSheet = workbook.getActiveWorksheet(); | |
// 取得原始資料範圍 | |
let dataRange = originalSheet.getRange("A1:D" + originalSheet.getUsedRange().getRowCount()); | |
let data = dataRange.getValues(); | |
let requiredDates = ["20250327", "20250326", "20250325", "20250324", "20250323", | |
"20250322", "20250321", "20250320", "20250319", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = // @generated by Peggy 4.0.2. | |
// | |
// https://peggyjs.org/ | |
(function() { | |
"use strict"; | |
function peg$subclass(child, parent) { | |
function C() { this.constructor = child; } | |
C.prototype = parent.prototype; | |
child.prototype = new C(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const disabled = [ | |
`#brave-ntp-branded-wallpaper-demo`, | |
`#brave-adblock-cookie-list-default`, | |
`#brave-adblock-cookie-list-opt-in`, | |
`#brave-adblock-cosmetic-filtering`, | |
`#brave-adblock-csp-rules`, | |
`#brave-adblock-default-1p-blocking`, | |
`#brave-adblock-mobile-notifications-list-default`, | |
`#brave-adblock-scriptlet-debug-logs`, | |
`#brave-super-referral`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regpath = "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" | |
$regname = "DisableFileSyncNGSC" | |
$OneDriveExe = $Env:LocalAppData + "\Microsoft\OneDrive\OneDrive.exe" | |
$value = Get-ItemPropertyValue -Path $regpath -Name $regname -ErrorAction SilentlyContinue | |
if ($value -eq 1) | |
{ | |
$command = '-noprofile -command "Set-ItemProperty -Path {0} -Name {1} -Value 0 -ErrorAction SilentlyContinue"' -f $regpath,$regname | |
Start-Process powershell.exe -Wait -Verb RunAs -ArgumentList $command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { writeAll } from "https://deno.land/[email protected]/streams/write_all.ts"; | |
import { load } from "npm:cheerio"; | |
import OpenAI from "npm:openai"; | |
// @deno-types="npm:@types/js-beautify" | |
import beautify from "npm:js-beautify"; | |
const res = await fetch("https://www.google.com/"); // 網址 | |
const html = await res.text(); | |
const $ = load(html); | |
$( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatController { | |
/** | |
* @param {YoutubeController} yt | |
*/ | |
constructor(yt) { | |
this.yt = yt; | |
this.isSticky = true; | |
} | |
get isSticky() { | |
return this._isSticky; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 擴充大小 | |
system_size=$(( $(du -sB512 system.img | cut -f1) + 200000 )) | |
e2fsck -yf system.img | |
resize2fs system.img "$system_size"s | |
# 掛載映像檔 | |
mkdir -p /tmp/system | |
sudo mount -o loop system.img /tmp/system | |
# | |
# << 在這邊編輯 /tmp/system 內容 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const channelId = document.querySelector('meta[itemprop="channelId"]').content; | |
location.href = `https://www.youtube.com/playlist?list=UUMO${channelId.replace(/^UC/, "")}`; | |
// Bookmark: | |
// javascript: (() => { const i = document.querySelector('meta[itemprop="channelId"]').content;location.href=`https://www.youtube.com/playlist?list=UUMO${i.replace(/^UC/, "")}` })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function endpointToUrl(navigationEndpoint, params, promise = false) { | |
if (!navigationEndpoint) | |
return null; | |
let url = ""; | |
if (navigationEndpoint.commandMetadata && navigationEndpoint.commandMetadata.webCommandMetadata && navigationEndpoint.commandMetadata.webCommandMetadata.url) { | |
url = navigationEndpoint.commandMetadata.webCommandMetadata.url; | |
} else if (navigationEndpoint.searchEndpoint) { | |
url = "/results?search_query=" + encodeURIComponent(navigationEndpoint.searchEndpoint.query).replace(/%20/g, "+"); | |
if (navigationEndpoint.searchEndpoint.params) { url += "&sp=" + navigationEndpoint.searchEndpoint.params; }; | |
} else if (navigationEndpoint.watchEndpoint) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$json = (Invoke-WebRequest -Uri https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest).Content | |
$release = ConvertFrom-Json -InputObject $json | |
$exe = $release.assets | ? { $_.name -eq "yt-dlp.exe" } | |
Invoke-WebRequest -Uri $exe.browser_download_url -OutFile yt-dlp.exe |
NewerOlder