Skip to content

Instantly share code, notes, and snippets.

@estan
estan / out.txt
Created March 9, 2022 15:12
by-path device names changing on reboot
orexplore@oden:~$ ls -1 /dev/disk/by-path/*part9
/dev/disk/by-path/pci-0000:03:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:04:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:43:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:44:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:81:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:82:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:c1:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:c2:00.0-nvme-1-part9
/dev/disk/by-path/pci-0000:c3:00.0-nvme-1-part9
@estan
estan / out.txt
Created March 9, 2022 10:51
zpool status
orexplore@oden:~$ zpool status
pool: srv
state: ONLINE
scan: scrub repaired 0B in 0 days 00:00:00 with 0 errors on Tue Mar 8 23:17:51 2022
config:
NAME STATE READ WRITE CKSUM
srv ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
nvme-SAMSUNG_MZQL2960HCJR-00A07_S64FNE0R600819 ONLINE 0 0 0
@estan
estan / access.log
Created December 27, 2020 11:53
Nextcloud Apache access log
XXX.XXX.XXX.XXX - - [23/Dec/2020:16:08:22 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 34108005941
XXX.XXX.XXX.XXX - - [23/Dec/2020:19:22:49 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 12683345912
XXX.XXX.XXX.XXX - - [23/Dec/2020:20:09:35 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 579796984
XXX.XXX.XXX.XXX - - [23/Dec/2020:20:09:49 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 438910968
XXX.XXX.XXX.XXX - - [23/Dec/2020:20:12:03 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 14012383224
XXX.XXX.XXX.XXX - - [24/Dec/2020:11:56:46 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 98296
XXX.XXX.XXX.XXX - - [24/Dec/2020:16:19:12 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 208748536
XXX.XXX.XXX.XXX - - [24/Dec/2020:16:19:36 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTTP/1.1" 200 10207224
XXX.XXX.XXX.XXX - - [24/Dec/2020:16:42:24 +0100] "GET /index.php/s/XXXXXXXXXXXXXXX/download HTT
@estan
estan / example.qml
Created February 25, 2020 16:04
Pass object + property name into custom editor?
//
// In this example, there's a root context property `machine`
// available, which has properties `depthFrom` and `depthTo`,
// which the FloatEditors below are supposed to control.
//
// How would I pass that information (`machine` + the name of
// the property) into each FloatEditor instance?
//
SomeWhereInMyApp {
@estan
estan / CMakeLists.txt
Created December 1, 2019 13:41
Unsetting CMAKE_CXX_CLANG_TIDY before adding subdirectory
cmake_minimum_required(VERSION 3.10)
project(tidytest)
set(CMAKE_CXX_VERSION 17)
add_executable(app app.cpp)
unset(CMAKE_CXX_CLANG_TIDY)
add_subdirectory(lib)
@estan
estan / CMakeLists.txt
Created December 1, 2019 13:16
Unsetting CMAKE_CXX_CLANG_TIDY test case
cmake_minimum_required(VERSION 3.10)
project(tidytest)
set(CMAKE_CXX_VERSION 17)
unset(CMAKE_CXX_CLANG_TIDY)
add_executable(app app.cpp)
@estan
estan / CMakeLists.txt
Created December 1, 2019 12:52
My src/libs/thirdparty/CMakeLists.txt
unset(CMAKE_CXX_CLANG_TIDY)
add_subdirectory(ed25519)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
if (MSVC)
# Workaround for https://github.com/google/googletest/issues/1373
add_definitions(/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
endif()
@estan
estan / CTestScript.cmake
Created November 29, 2019 08:37
CTestScript.cmake changes
include(CTestCoverageCollectGCOV)
set(CTEST_SOURCE_DIRECTORY ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_BINARY_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/../insight-build-ctest)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_COVERAGE_COMMAND "llvm-cov-8")
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE ".*/moc_.*" ".*/ui_.*" ".*/tests/.*" ".*/thirdparty/.*")
list(APPEND CTEST_EXTRA_COVERAGE_GLOB "*.cpp" "*.h")
@estan
estan / notarize-macos.py
Created July 11, 2019 07:59
Python script for notarizing an app (e.g. a .dmg)
#!/usr/bin/env python3
#
# Notarize a file (e.g. a .dmg)
#
# Usage: notarize-macos.py <Apple ID username> <Apple ID password> <file>
#
# Note: The --primary-bundle-id flag is hard-coded below, so you'll want to
# change that!
#
# See https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution#3087727
C++ version:
pixel at 0 0 is r = 255 g = 0 b = 0
pixel at 1 0 is r = 0 g = 255 b = 0
pixel at 0 1 is r = 0 g = 0 b = 255
pixel at 1 1 is r = 0 g = 0 b = 128
Python version:
pixel at 0,0 is r = 0, g = 0, b = 0