Skip to content

Instantly share code, notes, and snippets.

View kbakdev's full-sized avatar
👋
dev

Kacper Bąk kbakdev

👋
dev
View GitHub Profile
@kbakdev
kbakdev / ExportEventLogsToCSV.ps
Created May 28, 2023 18:34
Script that aggregates and exports event log data (Application, Security) from the last 5 days to a CSV file.
Set-Variable -Name EventAgeDays -Value 1
Set-Variable -Name CompArr -Value @("Localhost")
Set-Variable -Name LogNames -Value @("Security", "Application")
Set-Variable -Name EventTypes -Value @("Information", "Error", "Warning", "FailureAudit", "SuccessAudit")
Set-Variable -Name ExportFolder -Value "C:\"
$el_c = @()
$now = [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($(Get-Date), [System.TimeZoneInfo]::Local.Id, 'GMT Standard Time')
$startdate=$now.adddays(-5)
$ExportFile=$ExportFolder + "mx_sugus_poc_" + $now.ToString("yyyy.MM.dd_hh.mm") + ".csv"
#!/bin/bash
# Default values
button_count=8 # Total number of buttons
required_presses=-1 # Required number of buttons pressed (-1 means no requirement)
generate=false # Flag to check if we should generate combinations
# Function to display help
show_help() {
echo "Usage: $0 [-b BUTTON_COUNT] [-r REQUIRED_PRESSES] [-g]"
@kbakdev
kbakdev / node_modules_sync.sh
Created February 5, 2024 14:49
node_modules sync
#!/bin/bash
REMOTE_USER=$1
REMOTE_HOST=$2
REMOTE_PATH="/home/$REMOTE_USER"
LOCAL_PATH=$(pwd)
echo "Zipping node_modules..."
zip -r -q ../node_modules.zip node_modules/*
[
{
"role": "user",
"content": "Witam, tu Wojtek"
},
{
"role": "assistant",
"content": "Cześć Wojtek! Fajnie Cię widzieć w systemie. Co dobrego u Ciebie? U mnie pogodnie, trochę chmurek rozciągniętych nad Wawelem, ale generalnie widok na Kraków jak zawsze piękny! Jak mogę Ci dziś pomóc?"
},
{
@kbakdev
kbakdev / nvme_mount.md
Created March 29, 2026 14:42 — forked from a-maumau/nvme_mount.md
how to mount m.2 ssd/hdd