Skip to content

Instantly share code, notes, and snippets.

View toge's full-sized avatar
🏠
Working from home

toge toge

🏠
Working from home
View GitHub Profile
@bagder
bagder / compare.md
Last active December 24, 2024 17:09
URL parsers compared. libcurl vs ada
@lucidfrontier45
lucidfrontier45 / build.gradle
Last active July 2, 2022 13:17
VSCode and Gradle Settings for Modern Java Development
plugins {
id 'java'
id "jacoco"
id "com.diffplug.spotless" version "6.7.2"
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
@G4rryS1ngh
G4rryS1ngh / town_procgen.cpp
Created September 25, 2020 14:54
自動街生成🏙
# include <Siv3D.hpp> // OpenSiv3D v0.4.3
Array<Polygon> createPolygons(RectF rect, double density)
{
Array<Vec2> centers = PoissonDisk2D(rect.size.asPoint(), density).getPoints();
centers.each([=](Vec2& v) { v.moveBy(rect.tl()); });
centers.keep_if([=](Vec2 v) { return rect.contains(v); });
Array<Polygon> polygons;
@Sam-Belliveau
Sam-Belliveau / crc.hpp
Last active September 17, 2024 20:54
CRC16, CRC32, and CRC64 in constexpr C++14
/**
* Copyright 2019 Sam Robert Belliveau
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active April 8, 2026 21:31
C++ links: Coroutines (WIP draft)
@dsuess
dsuess / Dockerfile
Last active July 31, 2024 10:11
xeus-cling C++ Jupyter kernel inside a docker container
FROM frolvlad/alpine-miniconda3
RUN conda install -y -c conda-forge bash jupyter jupyter_contrib_nbextensions
RUN conda install -y -c conda-forge xeus-cling xtensor
RUN mkdir /notebooks
@WorldDownTown
WorldDownTown / append_google_sheets.sh
Last active December 20, 2022 02:04
Google Sheets の最終行に追記するスクリプト
#!/bin/bash
# Google Sheets の最終行に追記するスクリプト
# 訳あって最終行の位置を特定するために行数を取得している
# OAuth周りは下記がわかりやすい
# https://qiita.com/shin1ogawa/items/49a076f62e5f17f18fe5
CLIENT_ID="Google API ClientID"
CLIENT_SECRET="Google API's client secret"
REFRESH_TOKEN="Google API's refresh token"
@mhart
mhart / steps.sh
Last active September 11, 2023 11:01
Get SCL (and GCC 7) working on Amazon Linux 2017.03
yum install -y iso-codes # Needed for scl-utils-build
curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-20120927-11.el6.centos.alt.x86_64.rpm
curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-build-20120927-11.el6.centos.alt.x86_64.rpm
curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-rh-2-3.el6.centos.noarch.rpm
curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-7-3.el6.centos.noarch.rpm
rpm -Uvh *.rpm # Had to run this twice? Get an error first time, maybe Docker related
rm *.rpm
@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active April 15, 2026 19:53
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor: