Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mateusz Łoskot mloskot

🏠
Working from home
View GitHub Profile
@mloskot
mloskot / test_sqlserver_cast_bit_bug_report.cpp
Created Apr 15, 2020
Conversion with CAST(? AS BIT) only works for 0 or 1 when using ODBC API. 22003: [Microsoft][ODBC Driver 17 for SQL Server]Numeric value out of rang
View test_sqlserver_cast_bit_bug_report.cpp
// MWE for bug report submitted to SQL Server:
// https://feedback.azure.com/forums/908035-sql-server/suggestions/40180918-conversion-with-cast-as-bit-only-works-for-0-or
#include <cassert>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
#define NOMINMAX
#include <windows.h>
#include <sql.h>
@mloskot
mloskot / incredibuild-non-benchmark.md
Last active Nov 26, 2019
IncrediBuild non-Benchmark
View incredibuild-non-benchmark.md

Running BuildConsole.exe of IncrediBuild 9.4 to build a large project using Visual Studio 2017:

  • Machine 1: Intel Xeon E-2670v3 with 24 physical cores
  • Machine 2: Intel Xeon Gold 6230 with 40 physical cores
  • RAM 64 GB on both
  • HDD: SSD on both

The source code tree git clean-ed, IncrediBuild history and cache cleaned and machine restarted before every build.

  1. Machine 1 with IB on 16 cores of 48 logical cores (Hyper-Threading enabled)
@mloskot
mloskot / boost-1-72-gil-changelog.md
Created Oct 29, 2019
Boost.GIL changes between Boost 1.71 and 1.72
View boost-1-72-gil-changelog.md
git log boost-1.71.0..master --pretty=format:"1. [%h](http://github.com/boostorg/gil/commi t/%H) - %s" > boost-1-72-gil-changelog.md
  1. e8a04f403 - Merge branch 'develop' for Boost 1.72 release.
  2. 62379dd5b - Implement Sobel and Scharr operators (#392)
  3. 20f511b7d - Flatten structure of test/extension/io/output/ folder (#400)
  4. 29208c730 - Fix void istream_device::read function returning a value (#399)
  5. 100762760 - Add GIL_ENABLE_EXT_DYNAMIC_IMAGE to CMakeSettings.json example [ci skip]
  6. 146d81bb7 - Update exte
@mloskot
mloskot / boost-gil-with-cmake-for-vs.md
Last active Oct 23, 2019
Generate VS solution with CMake 3.14 for Boost.GIL using staged Boost
View boost-gil-with-cmake-for-vs.md
View soci-4.0.0-github-changelog.md

Changes in SOCI 4.0.0 since 3.2.3 using git log 3.2.3..master --pretty=format:"1. [%h](http://github.com/soci/soci/commit/%H) - %s"

  1. f8f97fb - Disable use of std::ptr_fun when compiling as C++17 (#751)
  2. 04e1870 - Fix crash in Windows by correctly initializing session member in copy constructor (#739)
  3. 9d0caa1 - Use 64-bit integer for next sequence and last insert ID values (#720)
  4. 349ce86 - Refine try-catch scopes in failover for PostgreSQL (#733)
  5. a47fd69 - Add pg reconnection loop (#731)
  6. 64e917c - Add finished call in pg failo
@mloskot
mloskot / build-geos-with-cmake-vs2019.md
Last active May 25, 2019
Building GEOS with CMake and Visual Studio on Windows
View build-geos-with-cmake-vs2019.md

Building GEOS with CMake and Visual Studio 2019 on Windows

Learn about CMake drivers

  • cmake to configure and build
@mloskot
mloskot / git_lfs_calculate_size_by_type.py
Last active May 30, 2019
Count Git LFS objects and their sizes, total and per file type
View git_lfs_calculate_size_by_type.py
#!/usr/bin/env python
# Counts Git LFS objects and per file type, and calculates total sizes.
import os
import sys
import tempfile
print('Collecting sizes of Git LFS objects')
tmp_file = os.path.join(os.getcwd(), 'tmp_sizes.tx')
os.system('git lfs ls-files --long --size > {0}'.format(tmp_file))
@mloskot
mloskot / Add-CMakeToolbar.ps1
Last active Apr 11, 2018
PowerShell script to add toolbar with CMake commands to Visual Studio 2017
View Add-CMakeToolbar.ps1
<#
.SYNOPSIS
Adds toolbar with CMake commands to Visual Studio 2017.
Workaround for "No toolbar or shortcuts for CMake integration", see
https://developercommunity.visualstudio.com/content/problem/199214/no-toolbar-or-shortcuts-for-cmake-integration.html
.DESCRIPTION
Visual Studio 2017 comes with integration for CMake,
with commands available from the dedicated top-level CMake menu.
@mloskot
mloskot / BashOnWindows.md
Last active Sep 26, 2018
BashOnWindows for C/C++ development
View BashOnWindows.md
@mloskot
mloskot / theraband_flexbar_tyler_twist.markdown
Last active May 31, 2019
TheraBand FlexBar "Tyler Twist" for Tennis/Golfer's Elbow
View theraband_flexbar_tyler_twist.markdown