Skip to content

Instantly share code, notes, and snippets.

View szdytom's full-sized avatar

方而静 szdytom

  • Dongguan, China
  • 00:26 (UTC +08:00)
View GitHub Profile
@szdytom
szdytom / retry_until_ok.py
Created September 18, 2020 12:38
retry until ok
#! /bin/python3
import os
import sys
import time
os.system("touch /tmp/retry_sys_last_cmd_tmp_store")
last_cmd_file = open("/tmp/retry_sys_last_cmd_tmp_store", "r")
last_cmd = str(last_cmd_file.read())
@ad8e
ad8e / glfw_ship.cpp
Last active June 2, 2025 12:28
instructions to use skia and glfw together. (download, installation, first program). as of Sept 2023, Windows is broken but this is still sadly the best starting resource for skia on Windows too.
/* Note: this Google copyright notice only applies to the original file, which has large sections copy-pasted here. my changes are under CC0 (public domain).
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
The official instructions don't work well. These alternative instructions are intended to be the shortest path to get a minimal setup running.
@mbinna
mbinna / effective_modern_cmake.md
Last active July 20, 2025 14:17
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