Skip to content

Instantly share code, notes, and snippets.

View herculosh's full-sized avatar
💭
I may be slow to respond.

Herculosh C0de herculosh

💭
I may be slow to respond.
View GitHub Profile
@herculosh
herculosh / read-md5-hash-from-xwlogfile.ps1
Created October 30, 2020 12:10
Reading Hash-Values from X-Ways Imager Logfile mit PowerShell and Regexp
PS> (Get-Content .\xways-imgager-log.txt -Raw) -match "(?sim)Hash of source data:.+(?<computed_md5>[0-9a-zA-Z]{32}).+\(MD5\).+(?<recomputed_md5>[0-9a-zA-Z]{32}).+\(MD5\)(?!=Data authenticity)"
@herculosh
herculosh / convertBrowserHistoryTo-CSV.ps1
Last active March 31, 2020 07:46
conversion of a BrowserHistory.json file to CSV from Google - takedown
$columnUTCDateTime = @{name="Date Time UTC";e={[datetimeoffset]::FromUnixTimeMilliseconds($_.Time_usec/1000).UtcDateTime}}
$columnLocalDateTime = @{name="Date Time local";e={[datetimeoffset]::FromUnixTimeMilliseconds($_.Time_usec/1000).LocalDateTime}}
(Get-Content "BrowserHistory.json" -Encoding UTF8 | ConvertFrom-Json)."Browser History" | select title, $columnLocalDateTime, url, page_transition, client_id, time_usec, $columnUTCDateTime | Export-Csv "BrowserHistory.csv" -NoTypeInformation -Delimiter ";"
@herculosh
herculosh / pandocomatic_variable_removed.yaml
Created February 8, 2020 12:07
Simple Sample for using pandocomatic with lualatex
settings:
follow-links: false
recursive: true
match-files: 'all'
skip: ['*.jpg','*.pygtex','*.png','**/temp/**', '*.pdf', '*.pptx']
templates:
test-pdf-opt:
glob: ['test_pdf_engine_opts_yaml.md']
pandoc:
from: markdown
@herculosh
herculosh / cleanup-jobsunstable.ps1
Last active September 26, 2019 05:03
Remove all Jobs in Jenkins older then 7 days
$jenkinsJobFolder = "\\servername\c$\Program Files (x86)\Jenkins\jobs\Falldaten Archivierung\builds"
# last* files are not taken for analysis
$allBuildJobFolder = Get-ChildItem -Directory $jenkinsJobFolder | ?{!($_.Name -ilike "last*")}
foreach($jobFolder in $allBuildJobFolder)
{
$buildxmlPath = (join-path -Path $jobFolder.fullname -ChildPath "build.xml")
"Computername";"Roles";"OS";Typ;CpuCount
"Server1";"CiscoINT,Cisco";"W2k8";"Server";"1"
"Server2";"Cisco,TAG,CiscoINT";"W2k8";"Server";"4"
"Server3";"Cisco,TAG,Metrics";"W2k8";"Server";"8"
"Client1";"";"W2k";"Client";"2"
"Client2";"";"W2K";"Client";"2"
"Client3";"";"W2k";"Client";"2"
"Client4";"";"Vista";"Client";"2"
"Client5";"";"Ubuntu";"Client";"2"
"FalscherClient6";"TAG";"MacOs";"Client";"2"