Skip to content

Instantly share code, notes, and snippets.

View maksim-petukhou's full-sized avatar

Maksim Petukhou maksim-petukhou

  • Warsaw, Poland
View GitHub Profile
@olljanat
olljanat / Find-OrphanDockerLayers.ps1
Last active May 13, 2025 09:46
Find Windows containers orphan layers
param (
[switch]$RenameOrphanLayers
)
If ($RenameOrphanLayers) {
Write-Warning "$($env:COMPUTERNAME) -RenameOrphanLayers option enabled, will rename all orphan layers"
}
# Get known layers on Docker images
[array]$ImageDetails += docker images -q | ForEach { docker inspect $_ | ConvertFrom-Json }
@mbinna
mbinna / effective_modern_cmake.md
Last active November 3, 2025 11:00
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@kakawait
kakawait / conf.py
Last active August 4, 2022 09:35
Sphinx only plugin
import sys, os
# The path where you put the only.py file
sys.path.append(os.path.abspath('../sphinx-ext/'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['scope']
@zenja
zenja / vsfs.py
Created December 23, 2013 22:27
A simulator for "Very Simple File System" (vsfs) based on http://pages.cs.wisc.edu/~remzi/OSFEP/file-implementation.pdf
#! /usr/bin/env python
import random
from optparse import OptionParser
DEBUG = False
def dprint(str):
if DEBUG:
print str