Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
@azyobuzin
azyobuzin / index.html
Created October 28, 2018 08:46
WagahighChoices 結果
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>結果 - Kaoruko</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
<style>
section {
margin-top: 20px;
using System;
using System.Globalization;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
class Program
{
static void Main(string[] args)
{
#include <stdio.h>
#include <tchar.h>
#include <Windows.h>
#include <locale.h>
void PrintError(DWORD error) {
LPTSTR str;
DWORD charCount = FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, error,
@azyobuzin
azyobuzin / proj.xml
Created July 28, 2018 18:45
条件に一致する最初の項目を取得しようとしてもうまくいかない例
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Build">
<ItemGroup>
<FooItem Include="Foo1" Meta="A" />
<FooItem Include="Foo2" Meta="B" />
<FooItem Include="Foo3" Meta="B" />
<FooItem Include="Foo4" Meta="C" />
</ItemGroup>
@azyobuzin
azyobuzin / eeprom_data.h
Created July 17, 2018 16:04
校歌への思い
#include <avr/eeprom.h>
uint8_t EEMEM eeprom_data[64];
// MIDI 番号
#define AS4 70
#define B4 71
#define C5 72
#define CS5 73
#define D5 74
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content office:version="1.2"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
@azyobuzin
azyobuzin / Benchmark-report-github.md
Last active June 22, 2018 15:26
これが最強の桁数カウントだ
BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17692
Intel Core i7-3770 CPU 3.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
  [Host]     : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.3062.0
  DefaultJob : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.3062.0

| Method | Source | Mean | Error | StdDev | Median |

@azyobuzin
azyobuzin / Benchmark-report-github.md
Last active June 22, 2018 14:55
Decimal 割りまくる
BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17692
Intel Core i7-3770 CPU 3.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
  [Host]     : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.3062.0
  DefaultJob : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.3062.0

| Method | Source | Mean | Error | StdDev |

@azyobuzin
azyobuzin / PipeTestApp.java
Created June 12, 2018 02:44
PipedReader/Writer が遅いのか notify が遅いのか調べたけど PipedReader/Writer が遅かった
package dentaku.gui;
import javax.swing.*;
import java.awt.*;
import java.io.IOError;
import java.io.IOException;
import java.io.PipedReader;
import java.io.PipedWriter;
public class PipeTestApp {
@azyobuzin
azyobuzin / nugetcalcweb.conf
Created April 29, 2018 12:26
イニシエの Upstart スクリプト
description "NuGetCalc Online"
start on runlevel [2345]
stop on runlevel [016]
chdir /home/azyobuzin/repo/NuGetCalcWeb/NuGetCalcWeb
env NUGETCALC_BASEURI=http://nugetcalc.azyobuzi.net/
env NUGETCALC_ANALYTICS=http://junk.azyobuzi.net/nugetcalcweb/analytics.html
env NUGETCALC_AD=""
env MONO_PREFIX=/opt/mono-20150501052837