Skip to content

Instantly share code, notes, and snippets.

View tsuyoshicho's full-sized avatar

Tsuyoshi CHO tsuyoshicho

View GitHub Profile
# Github
Host github.com
# Alt/Use for Over HTTPS at 443
# Hostname ssh.github.com
# Port 443
Hostname github.com
# gist(use ssh)
Host gist.github.com
# Over HTTPS
@tsuyoshicho
tsuyoshicho / .clang-format.sample.yaml
Created March 29, 2018 08:13 — forked from yasuharu519/.clang-format.sample.yaml
clang-format の設定サンプル
---
BasedOnStyle: 'Google'
AccessModifierOffset: -2
AlignEscapedNewlinesLeft: true
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true,
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: 'Inline'
@tsuyoshicho
tsuyoshicho / github.css
Last active May 20, 2018 04:42 — forked from griffin-stewie/github.css
Pandoc で github 風 CSS を使った standalone な html を生成するための CSS(要 pandoc 1.12.3) http://griffin-stewie.hatenablog.com/entry/2014/03/28/125029
/* based on https://qiita.com/griffin_stewie/items/95026360fdfca1bd8e33 */
/* https://gist.github.com/griffin-stewie/9755783 */
/* http://griffin-stewie.hatenablog.com/entry/2014/03/28/125029 */
/* https://gist.github.com/andyferra/2554919 */
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
@tsuyoshicho
tsuyoshicho / test.java
Last active October 7, 2017 09:28
JavaのEnumを別要素で検索する、の検討 ref: http://qiita.com/tsuyoshi_cho/items/698812641bcd45adbf41
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.function.*;
interface Searchable {
public static <T extends Enum,N extends Comparable> Optional<T> getByCode(Supplier<T[]> v,Function<T,N> s,N code)
{
@tsuyoshicho
tsuyoshicho / PlantUML-Sample.md
Last active September 13, 2017 12:54
PlantUMLを使うgistの手順を明確化

PlantUMLのシーケンス図(他)の公開手順

  1. 新規Gist
  2. ベースのMarkdown記事を作る、PlantUMLなソースも作る
  3. Gistをclone
  4. cloneしたリポジトリに、PlantUMLから生成した画像をadd
  5. commit&push
  6. 画像のURLを確認
  7. Markdownにリンク追加 "![alt txt](img url)"
  8. 必要なら、更新の都度、pull->edit->plantuml generate->add->commit->pushで更新
@tsuyoshicho
tsuyoshicho / 2017-04-15 テスト版 Mastodon 鱒丼君 masudon-kun.user.js
Created April 15, 2017 04:08
2017-04-15 テスト版 Mastodon 鱒丼君 masudon-kun 確認版ファイル
// ==UserScript==
// @name Mastodon 鱒丼君 masudon-kun
// @namespace http://userstyles.org
// @description 鱒丼でオフパオしようぜ!
// @author 生駒菜々(やっきゅん)
// @homepage https://userstyles.org/styles/141271
// @include http://mastodon.network/*
// @include https://mastodon.network/*
// @include http://*.mastodon.network/*
// @include https://*.mastodon.network/*
@tsuyoshicho
tsuyoshicho / .nyagos
Last active May 14, 2017 00:07
Nyagos リポジトリブランチ名表示 プロンプトの一例 ref: http://qiita.com/tsuyoshi_cho/items/d029825b6d8d3688da92
-- comment
-- prompt
-- 関数定義がうまくいかないので、クロージャ内のローカル関数にする
nyagos.prompt = function(this)
------------------------------------------------
-- strをpatで分割しテーブルを返す
-- code from 'http://lua-users.org/wiki/SplitJoin'
local function split(str, pat)
local t = {} -- NOTE: use {n = 0} in Lua-5.0
@tsuyoshicho
tsuyoshicho / nicovideo_minibanner_hidden.js
Created March 12, 2017 01:24
ニコニコのコメント欄下広告の消去
// ==UserScript==
// @name nicovideo small ad close
// @description ニコニコ動画のコメント欄下の広告を消す
// @namespace tsuyoshicho
// @include http://www.nicovideo.jp/watch/*
// @version 1
// @grant none
// ==/UserScript==
// MiniBannerAdContainer をhiddenにする か DOM要素を除去
@tsuyoshicho
tsuyoshicho / file0.txt
Last active October 29, 2016 09:16
WindowsのCIFS/SMB共有のマウント(Windows 10 Anniversary update以降でもOK) ref: http://qiita.com/tsuyoshi_cho/items/bffa6ec996035b68320b
コントロール パネル\ネットワークとインターネット\ネットワークと共有センター\共有の詳細設定
@tsuyoshicho
tsuyoshicho / notify-maker.sh
Last active February 24, 2018 09:44
コンソールやシェルスクリプトからのメッセージ通知(日本語OK) ref: https://qiita.com/tsuyoshi_cho/items/a22d895ed67221b8e32e
#!/bin/bash
# Event check
event="$1"
if [ -z "${event}" ];then
# fail
exit 1
fi
# Key