Skip to content

Instantly share code, notes, and snippets.

View Track3's full-sized avatar

Track3

View GitHub Profile
@Track3
Track3 / Microsoft.PowerShell_profile.ps1
Created February 12, 2023 14:26
My PowerShell profile
Invoke-Expression (&starship init powershell)
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
function ^ {explorer.exe .}
function now {
$now = Get-Date -Format "o"
Set-Clipboard $now
Write-Output $now
}
function gitconf {code $HOME/.gitconfig}
@Track3
Track3 / md-draft-filter.ts
Created November 5, 2022 07:36
A simple Deno script to remove all markdown draft files based on its frontmatter
import { extract } from "https://deno.land/std@0.162.0/encoding/front_matter/any.ts";
import { join } from "https://deno.land/std@0.162.0/path/mod.ts";
const targetDir = "content";
const fileList: string[] = [];
function findFile(directory: string) {
for (const dirEntry of Deno.readDirSync(directory)) {
const fullPath = join(directory, dirEntry.name);