Skip to content

Instantly share code, notes, and snippets.

@qis
qis / workout.md
Last active October 19, 2017 06:53
Workout Progress

Workout Progress

https://emojipedia.org/food-drink/

Planned Workout: Mo: Strength, Tu: Endurance, We: Strength, Th: Endurance, Fr: Strength
Planned Daily Intake: 1040-1300 kcal, 40-60g fat, 50g carbs, 120-140g protein

@qis
qis / freebsd.md
Last active August 25, 2023 11:46
Installation and setup instructions for FreeBSD

FreeBSD

Installation template for FreeBSD RELEASE, STABLE and CURRENT.

Distribution Select

[ ] doc
[*] src (for building ports)
@qis
qis / parse_date.h
Last active April 5, 2022 05:50
Parse ISO 8601 date time strings in C++ and AVX2.
// if(MSVC)
// set(AVX2_FLAGS "/arch:AVX2")
// else()
// set(AVX2_FLAGS "-march=native -mavx2")
// endif()
//
// option(ENABLE_AVX2 "Enable AVX2 support" OFF)
// if(ENABLE_AVX2)
// if(CMAKE_CROSSCOMPILING)
// set(AVX2 TRUE)
@qis
qis / unicode.md
Last active February 12, 2019 11:07
☐ Not Set: 'BALLOT BOX' (U+2610)
▣ Partial: 'WHITE SQUARE CONTAINING BLACK SMALL SQUARE' (U+25A3)
☑ Yes: 'BALLOT BOX WITH CHECK' (U+2611)
☒ No: 'BALLOT BOX WITH X' (U+2612)
◉ Selected: 'FISHEYE' (U+25C9)
◎ Option: 'BULLSEYE' (U+25CE)
#include <result.hpp>
#include <vulkan.hpp>
#include <windows.h>
#include <version.h>
#include <algorithm>
#include <string>
#include <string_view>
// TODO: Read the specification chapter 6 about synchronization.
// https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#synchronization
@qis
qis / vulkan.hpp
Last active October 16, 2019 15:40
#pragma once
#include <result.hpp>
#include <vulkan/vulkan.h>
#include <windows.h>
#include <memory>
#include <string_view>
#include <vector>
#include <cassert>
struct VkCommandPipelineBarrierInfo {
@qis
qis / regex.cpp
Last active June 6, 2022 10:50
// ------------------------------------------------------------------------
// Benchmark LGCG Time LTO Time Iterations LTCG Build LTO Build
// ------------------------------------------------------------------------
// regex_boost 317 ns 69.1 ns 2133333 00:02.720 00:08.70
// regex_ctre 248 ns 4.79 ns 2800000 05:08.755 00:04.78
// regex_hyperscan 96.7 ns n/a 7466667 00:52.487 n/a
// regex_re2 186 ns 3.97 ns 4072727 00:03.353 00:05.94
// regex_spirit 44.3 ns 0.644 ns 15448276 00:03.487 00:05.25
// regex_std 2371 ns 67.2 ns 280000 00:02.442 00:05.54
// regex_xpressive 552 ns 273 ns 1000000 00:05.369 00:11.52
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"/>
@qis
qis / sink.hpp
Created January 22, 2020 15:56
Custom spdlog sink.
#pragma once
#include <fmt/color.h>
#include <spdlog/details/pattern_formatter.h>
#include <spdlog/sinks/sink.h>
class sink : public spdlog::sinks::sink {
public:
sink(spdlog::color_mode mode = spdlog::color_mode::automatic) {
styles_[spdlog::level::trace] = fmt::fg(fmt::terminal_color::bright_black) | fmt::emphasis::bold;
styles_[spdlog::level::debug] = fmt::fg(fmt::terminal_color::bright_white) | fmt::emphasis::bold;

Microsoft Edge

Install Microsoft Edge and configure edge://settings.

Privacy and services
+ Privacy
  Allow sites to check if you have payment methods saves: Off
+ Services
  Use a web service to help resolve navigation errors: Off
  Suggest similar sites when a website can't be found: Off