Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Kuniwak Kuniwak

💭
I may be slow to respond.
Block or report user

Report or block Kuniwak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Kuniwak
Kuniwak / SE0176Tests.swift
Last active Jan 25, 2018
SE-0176 の理解を確認するための例題集です
View SE0176Tests.swift
// 問題: コンパイルエラーもしくは実行時警告になる testX 関数をすべて答えてください。
import XCTest
class SE0176PlaygroundTests: XCTestCase {
func test1() {
struct ExampleStruct {
mutating func assignedBy(_ block: () -> ExampleStruct) {
self = block()
View kitchen-dianose-error.md
$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]

$ bundle list | grep kitchen
  * kitchen-ansible (0.45.9)
  * kitchen-vagrant (1.0.1)
  * test-kitchen (1.15.0)
View catharsis-types
{!(number|boolean)}
{!Object}
{!number|!string}
{!{myNum: number}}
{"foo.bar.baz"}
{'foo.bar.baz'}
{(Array.<string>|Object.<string, ?>)}
{(Array|Object.<string, ?>)}
{(Element|Object|Document|Object.<string, (string|function(!jQuery.event=))>)=}
{(Error|function(): Error)}
View solver.pl
count(List, X, Count) :- count_sub(List, X, 0, Count).
count_sub([], _, N, N).
count_sub([Head | Xs], X, N, Count) :-
(Head == X -> N1 is N + 1; N1 is N),
count_sub(Xs, X, N1, Count).
% トランプの数は1〜13まで。
card(X) :- between(1, 13, X).
% さやかのヒントにあてはまる。
@Kuniwak
Kuniwak / 4bit_adder.ts
Created Jul 13, 2015
Compile-Time 4-bit adder on TypeScript
View 4bit_adder.ts
// Compile-Time 4-bit Adder for TypeScript
// Author: https://github.com/Kuniwak
// INTPUT ////////////////////////////////
// O: Low
// I: High
let inputA1: I;
let inputA2: I;
let inputA3: O;
View .cvimrc
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map <C-h> deleteChar
cunmap <C-h>
let scrollstep = 200
@Kuniwak
Kuniwak / file0.txt
Last active Aug 29, 2015
vimrc アンチパターンを自動でチェックする ref: http://qiita.com/Kuniwak/items/407ab494281427847af0
View file0.txt
pip install vim-vint
View scope_plugin_design_note.md
  1. identifier が定義・参照・静的解析不能を判別
    • IdentifierClassifier
    • IdentifierCollector
  2. Scope chain を作成
    • ScopeStore
  3. declaring identifier を scope に登録、scope を referencing identifier に登録
    • ScopeLinker
  4. referencing identifier から declaring identifier に到達可能かどうかを調べる
    • ParentAttacher
    • ReferenceReachabilityTester
View vint-ast.markdown
stmt left list op rest right type
let num = 0 identifier = number let
let dict[key] = 0 dot = number let
let list[0] = 99 subscript = number let
let list[1:2] = [99, 99] slice = list let
let str .= 'str_to_add' identifier .= number let
let $ENV = 'str_content' env = string let
let @@ = 'str_content' reg = string let
let [elem0, elem1] = [0, 1] [identifier, identifier] = list let
@Kuniwak
Kuniwak / file0.txt
Created Aug 12, 2014
peco と alias -g で git に便利革命おきた ref: http://qiita.com/Kuniwak/items/b711d6c3e402dfd9356b
View file0.txt
$ git commit
You can’t perform that action at this time.