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
# Extract OCR contents in PDF-documents as plain text (.txt) | |
# Kristian Risager Larsen, 2024-07 | |
# | |
# Setup: | |
# You need to install GhostsScript and Tesseract | |
# brew install tesseract tesseract-lang ghostscript | |
# | |
# Notes: | |
# The "-l dan" parameter tells Tesseract to expect Danish text |
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
docker ps -a --format "table {{.Names}}\t{{.CreatedAt}}\t{{.Status}}" |
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
REM Kristian Risager Larsen, 2023-09 | |
echo %date% | |
"C:\Program Files\7-Zip\7z.exe" a -t7z -v3g c:\backup\backup_%date%.7z c:\ -mx9 -xr!*.sys -xr!*Backup* | |
echo %date% | |
pause |
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
docker ps -a --format "table {{.Names}}\t{{.CreatedAt}}\t{{.Status}}" |
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
Compare-Object -ReferenceObject (get-aduser USER1 -Properties memberof | select -expand memberof | sort) -DifferenceObject (get-aduser USER2 -Properties memberof | select -expand memberof | sort) -IncludeEqual | sort SideIndicator |
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
REM Deleting all .log-files (older than 30 days) recursively | |
forfiles -p "d:\logs" -s -m *.xlsx -d -30 -c "cmd /c if @isdir==FALSE del @path" |
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
'' List potentially unused MSSQL databases | |
'' for a single database | |
EXECUTE sp_msforeachdb 'SELECT TOP 1 * FROM [?].sys.objects ORDER BY modify_date DESC' | |
'' for all databases | |
CREATE TABLE #database_age (db_name VARCHAR(255), name VARCHAR(255), modify_date DATETIME, type_desc VARCHAR(255)) | |
EXECUTE sp_msforeachdb 'INSERT INTO #database_age SELECT TOP 1 ''[?]'' AS db_name, name, modify_date, type_desc FROM [?].sys.objects WHERE type_desc NOT IN (''INTERNAL_TABLE'',''SYSTEM_TABLE'', ''SERVICE_QUEUE'') ORDER BY modify_date DESC' | |
SELECT * FROM #database_age ORDER BY modify_date |
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
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>New browser tab for each line</title> | |
<script> | |
function searchgoogle () { | |
var searchlines = document.getElementById("searchfield").value; | |
searchlines = searchlines.split("\n"); |
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
-- Lists all active schedules | |
-- Tested with Blue Prism version 6.4 | |
-- List of all active schedules including Termination Reason (my company's MSSQL version does not support the STRING_AGG function, so this could be prettier) | |
SELECT bpaschedule.name, | |
logkolonner.instancetime, | |
logentrykolonner.terminationreason | |
FROM bpaschedule | |
CROSS apply (SELECT TOP 1 bpaschedulelog.scheduleid, | |
bpaschedulelog.instancetime, |
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
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>New Google search for each line</title> | |
<script> | |
function searchgoogle () { | |
var searchlines = document.getElementById("searchfield").value; | |
searchlines = searchlines.split("\n"); |
NewerOlder