Skip to content

Instantly share code, notes, and snippets.

View igorzg's full-sized avatar
🎯
Focusing

igorzg igorzg

🎯
Focusing
View GitHub Profile
@igorzg
igorzg / ohmyposh.json
Created November 18, 2021 21:01
Oh My Posh Theme
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@igorzg
igorzg / Microsoft.PowerShell_profile.ps1
Created November 18, 2021 21:35
Microsoft PowerShell profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@igorzg
igorzg / debian_gpu_passthroug_configs.md
Last active July 8, 2022 10:39
AMD Ubuntu / Debian GPU Passthrough

It's correct vfio configuration for GPU Passthrough, you will need to change ids to your GPU pci slot.

packages

sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-daemon-system libvirt-clients bridge-utils

Verify IOMMU is enabled

dmesg | grep IOMMU
@igorzg
igorzg / fedora_gpu_passthroug_configs.md
Last active July 11, 2022 09:05
AMD Fedora GPU Passthrough

It's correct vfio configuration for GPU Passthrough, you will need to change ids to your GPU pci slot.

packages

sudo dnf group install virtualization

Verify IOMMU is enabled

dmesg | grep IOMMU
@igorzg
igorzg / dynamodb-json-mapper.js
Last active October 27, 2022 15:06
Dynamo db json re mapper
/**
MIT License
Copyright (c) 2016 Igor Ivanovic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans