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
@toge
toge / C++のコード
Created June 25, 2023 15:30
ポワゾン分布みたいなやつ
#include <iostream>
#include <random>
#include <ctime>
int main() {
std::random_device rd;
std::mt19937_64 gen(rd());
std::uniform_real_distribution<double> dis(0.0, 1.0);
double y = 1.0 / 100.0;
@toge
toge / wezterm.lua
Created March 13, 2022 01:38
wezterm config
local wezterm = require("wezterm")
local default_keybinds = {
{ key = "c", mods = "CTRL|SHIFT", action = wezterm.action({ CopyTo = "Clipboard" }) },
{ key = "v", mods = "CTRL|SHIFT", action = wezterm.action({ PasteFrom = "Clipboard" }) },
{ key = "Insert", mods = "SHIFT", action = wezterm.action({ PasteFrom = "PrimarySelection" }) },
{ key = "=", mods = "CTRL", action = "ResetFontSize" },
{ key = "+", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = " ", mods = "CTRL|SHIFT", action = "QuickSelect" },
@toge
toge / conky
Last active April 25, 2021 19:03
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, 2013, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
@toge
toge / qtsvg_sample.cpp
Created February 14, 2020 03:53
Qt5を使ってSVGをPNGに描画してみるテスト
/** Qt5を使ってSVGをPNGに描画してみるテスト */
#include "QtSvg/QtSvg"
#include <iostream>
#include <memory>
int main(int argc, char **argv)
{
if (argc != 2) {
std::cerr << argv[0] << " <svg filename>" << std::endl;
@toge
toge / example.cpp
Last active September 22, 2016 12:58
scoped enumを引数にしてOR指定
#include "param.h"
enum class FooFlag : int {
A = 1,
B = 1 << 1
};
void bar(Param<FooFlag> param) {
return;
}