Skip to content

Instantly share code, notes, and snippets.

Avatar

Joe Taber infogulch

View GitHub Profile
@infogulch
infogulch / README.md
Last active Nov 25, 2021 — forked from alimbada/Export-Chocolatey.ps1
Export installed Chocolatey packages as packages.config - thanks to Matty666
View README.md

Put update.ps1, install.ps1, record.ps1, and packages.config inside a git repository to enable tracking which versions you have installed at any one time. This means you can sync between systems and backup via any git host.

Update procedure is:

git pull
./update.ps1
git commit -m "Updated $env:computername"
git push
View gist:3830136
table t1 contains 4 rows, with id = 1, 2, 3, 5
SELECT X, Y
FROM (
SELECT A.id as X, (SELECT MIN(b.id) FROM t1 AS B WHERE B.id > A.id) as Y
FROM t1 AS B
) C
WHERE Y IS NOT NULL
id1 | id2