Skip to content

Instantly share code, notes, and snippets.

View dylanliuh2o's full-sized avatar
🎯
Focusing

dylanliuh2o dylanliuh2o

🎯
Focusing
View GitHub Profile
Remove-NetFirewallRule -DisplayName "WSL"
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Action Allow
@xitongsys
xitongsys / WSL 2 GNOME Desktop.md
Created January 12, 2021 23:51
Set up a GNOME desktop environment on WSL 2

WSL 2 GNOME Desktop

Think Xfce looks dated? Want a conventional Ubuntu experience? This tutorial will guide you through installing Ubuntu's default desktop environment, GNOME.

GNOME is one of the more complex — and that means more difficult to run — desktop environments, so for years people couldn't figure out how [to](https://www.reddit.

@SemenMartynov
SemenMartynov / producer-consumer.cpp
Created September 25, 2020 10:37
[Multiple producer - one consumer] with the modern C++
#include <thread>
#include <iostream>
#include <queue>
#include <mutex>
#include <algorithm>
#include <condition_variable>
#include <atomic>
#include <random>
std::mutex mtx;
@saidinesh5
saidinesh5 / nestedjson.cpp
Last active December 9, 2023 02:43
Get/Set values in nested QJsonObjects using "/path/to/key" syntax
#include <QJsonDocument>
#include <QJsonObject>
#include <QDebug>
static QString const &data = R"(
{
"persistentData": {
"module": {
"name": "fancy module",
"options": {}
@mbinna
mbinna / effective_modern_cmake.md
Last active December 6, 2025 05:54
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

@adanner
adanner / FixQtCreator.md
Last active April 22, 2022 16:07
Fix QtCreator not finding CMake

Problem Description

QtCreator complains on opening new CMakeLists.txt project that

No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
 to the compiler, or to the compiler name if it is in the PATH.