Skip to content

Instantly share code, notes, and snippets.

@ysakasin
ysakasin / bcdice.md
Last active May 29, 2019 11:03
BCDiceを受け継いだら取り組みたいことリスト

BCDiceを受け継いだら取り組みたいことリスト

  • 古いRubyを対応外に
    • EOLしたRubyは対象外?
  • IRCのGUI版は撤去
  • IRC機能そのものを撤去してライブラリとして注力?
  • ダイスエンジンをgem化?
  • ドキュメントをmarkdownに
  • travis CIをちゃんとまわす
  • コードの静的チェックをかけて不要なコードを消せたらなって
BLACK="\[\e[30m\]"
RED="\[\e[31m\]"
GREEN="\[\e[32m\]"
YELLOW="\[\e[33m\]"
BLUE="\[\e[34m\]"
MAGENTA="\[\e[35m\]"
CYAN="\[\e[36m\]"
WHITE="\[\e[37m\]"
END="\[\e[m\]"
@ysakasin
ysakasin / gcd.ll
Created September 6, 2018 13:21
mem2regを適用した例
; ModuleID = 'top'
source_filename = "top"
define i64 @main() {
entrypoint:
%x = alloca i64
%y = alloca i64
store i64 84, i64* %x
store i64 36, i64* %y
%0 = load i64, i64* %x
@ysakasin
ysakasin / keybindings.json
Created May 17, 2018 00:34
VSCode keybindings
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
{
"key": "cmd+t",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+shift+[BracketLeft]",
"command": "-workbench.action.terminal.toggleTerminal"
},
// Copyright (c) 2018 SAKATA Sinji. Released under the MIT license.
#include <chrono>
#include <cstdint>
#include <iostream>
#include <thread>
#include <vector>
#include <cstdio>
using namespace std;
// Copyright (c) 2018 SAKATA Sinji. Released under the MIT license.
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
using namespace std;
/* -------------------------------------------------------
* tictoc_increase_test.cpp
*
* The MIT License (MIT)
* Copyright (c) 2017 SAKATA Sinji
*
* References
* - TicToc https://people.csail.mit.edu/sanchez/papers/2016.tictoc.sigmod.pdf
* - oltp-cc-bench https://github.com/starpos/oltp-cc-bench
* ------------------------------------------------------- */
/* -------------------------------------------------------
* tictoc_atomicread_test.cpp
*
* The MIT License (MIT)
* Copyright (c) 2017 SAKATA Sinji
*
* References
* - TicToc https://people.csail.mit.edu/sanchez/papers/2016.tictoc.sigmod.pdf
* - oltp-cc-bench https://github.com/starpos/oltp-cc-bench
* ------------------------------------------------------- */
@ysakasin
ysakasin / mkpasswd
Created June 15, 2017 07:23
パスワード用にランダムな文字列を生成する
#!/bin/bash
print_help () {
echo -e "Usage: mkpasswd [options] " 1>&2
echo -e " -l\tset password length" 1>&2
echo -e " -n\tset number of passwords" 1>&2
echo -e " -h\tshow this message" 1>&2
}
while getopts n:l:h OPT