Skip to content

Instantly share code, notes, and snippets.

View Pxtl's full-sized avatar
😶

Martin Zarate Pxtl

😶
View GitHub Profile
@Pxtl
Pxtl / gist:3e2ef6fe5e535d6818c624011f80ba0c
Created April 30, 2016 20:34 — forked from lontivero/gist:593fc51f1208555112e0
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
@Pxtl
Pxtl / Rename-BinCue.ps1
Created December 26, 2019 05:22
Rename Bin/Cue file using Powershell - designed for PS1 files
# for a given cue/bin pair, rename the bin file, rename the cue file with the corresponding name,
# and update the bin reference within the cue file to match
[cmdletbinding()]
param(
[Parameter(Mandatory)][io.FileInfo]$sourceBinPath,
[Parameter(Mandatory)][string]$newName
)
$sourceCuePath = [io.path]::ChangeExtension($sourceBinPath, 'cue')
write-verbose("sourceCuePath: $sourceCuePath")
$sourceBinName = [io.path]::GetFileName($sourceBinPath)
@Pxtl
Pxtl / Create-m3u.ps1
Created December 26, 2019 05:24
Use Powershell to create a ps1 m3u compatible with Lakka
# create an m3u from the given list of files
[cmdletbinding()]
param(
[Parameter(Mandatory)][string] $targetFilePath,
[Parameter(Mandatory)][IO.FileInfo[]]$sourceCuePaths
)
$targetFilePath = [IO.Path]::ChangeExtension($targetFilePath, 'm3u')
$m3uBodyArray = $sourceCuePaths | foreach-object {
[IO.Path]::GetFileName($_)
}
@Pxtl
Pxtl / ExistsSelectStarFromGrouped_MSSql-vs-Postgres.sql
Created August 7, 2024 16:02
Script that works in MS SQL but not in POSTGRES, demonstrating different behavior of "select *" within an EXISTS clause.
-- The following code works in MS SQL 2019
-- But fails in Postgres 14.12 (PG 14 was released in 2021)
DROP TABLE IF EXISTS EMPLOYEE;
-- create
CREATE TABLE EMPLOYEE (
empId INTEGER PRIMARY KEY,
name VARCHAR(50) NOT NULL,
dept VARCHAR(50) NOT NULL
Oct23 14:35:59 C:\github\t4BuildDemo With Spaces\test t4 build> dotnet clean
Build started 2024-10-23 2:36:04 PM.
1>Project "C:\github\t4BuildDemo With Spaces\test t4 build\test t4 build.sln" on node 1 (Clean target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
1>Project "C:\github\t4BuildDemo With Spaces\test t4 build\test t4 build.sln" (1) is building "C:\github\t4BuildDemo
With Spaces\test t4 build\test t4 build.csproj" (2) on node 1 (Clean target(s)).
2>TextTemplateClean:
dotnet exec "C:\Users\zaratem\.nuget\packages\t4.build\0.2.4\build\../tools/T4.Build.dll" clean "Static Text Temp
late.tt" "TextTemplate Test Withdate.tt" "TextTemplate That Reads File.tt"