Skip to content

Instantly share code, notes, and snippets.

View niiyz's full-sized avatar

Tetsuya Yoshida niiyz

View GitHub Profile
@niiyz
niiyz / commit_message_example.md
Created September 9, 2020 05:29 — forked from mono0926/commit_message_example.md
[転載] gitにおけるコミットログ/メッセージ例文集100
@niiyz
niiyz / gen.py
Created May 4, 2020 05:21
ジェネレータ関数が __next__() メソッドによって再開された時、その時点の yield 式の値は常に None と評価されます。
def echo(value=None):
print("Start echo")
try:
while True:
value = (yield value)
finally:
print("End echo")
def echo2(value=None):
@niiyz
niiyz / sign-pdf.rb
Created July 12, 2019 03:26 — forked from matiaskorhonen/sign-pdf.rb
Quick and dirty PDF signing in Ruby (using Origami)
#!/usr/bin/env ruby
require "openssl"
require "time"
begin
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
end
@niiyz
niiyz / gist:0c1993c91346bebf190c8ce412078db6
Created August 12, 2017 09:31
tickPositioner hicharts
tickPositioner: function () {
var max = Math.max(Math.abs(this.dataMin), Math.abs(this.dataMax));
var digitNumber = String(max).length - 2;
var div = Math.pow(10, digitNumber);
var ceilMax = Math.ceil(max / div) * div;
return [-1, -0.75, -0.5,-0.25, 0, 0.25, 0.5, 0.75, 1].map(function (n) {
return Math.round(ceilMax * n);
});
@niiyz
niiyz / remote.hs.md
Last active April 20, 2017 00:57
Remote.hs GHCJS #13に参加の準備.md

Remote.hs GHCJS #13に参加の下準備

  • macOS Sierra 10.12.4
  • Homebrewインストール済み
% brew install haskell-stack
@niiyz
niiyz / init.el
Created April 7, 2017 23:26
emacs init.el
;;; init.el --- -*- lexical-binding: t -*-
;; Copyright (c) 2013-2016, Fanael Linithien
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;;
;; * Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the following disclaimer.
@niiyz
niiyz / multiwriter-5650c-mac
Last active March 25, 2017 09:09
NEC MultiWriter 5650C Macの無線設定
OS: Mac OS X EL Caption
ルーター: A T E R M - 7 9 2 9 1 5 (auひかり)
## 1. プリンタ本体の操作パネル
### 1.1 無線LAN設定
- SSID、パスワード Macとプリンタで同じwifiを選択する。-gと-gwとかはダメ
### 1.2 IPv4のDHCP設定(ルーターを再起動したらip振られる)
1 操作パネルで ( メニュー ) OKボタンを押します。
(* 野球成績型 *)
type baseball_seiseki = {
name: string; (* 名前 *)
won: int; (* 勝ち数 *)
drawn: int; (* 引けわけ数 *)
lost: int; (* 負け数 *)
}
(* 2016データ *)
let hiroshima = {name = "広島"; won = 89; drawn = 2; lost = 52}
@niiyz
niiyz / miyagi-pref-quantize-5000.json
Created December 24, 2016 10:46
miyagi-pref-quantize-5000.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@niiyz
niiyz / file-miyagi-pref-quantize-1e4.json
Created December 24, 2016 10:37
file-miyagi-pref-quantize-1e4.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.