Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Taiju Muto tai2

🏠
Working from home
Block or report user

Report or block tai2

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
View gist:12323cc154a9b504cd7212dc19bf6ab9
英語は主に本からかなー。思い出せる限りまとめてみる。
英語勉強しはじめたのは、21から(それまで中学英語レベルもまったくできなかった)。
まず最初にやったのは、中学英語の教科書を本屋さんいって買ってきて、その本文を100回だっけな?
通しで音読した。英語に対する苦手意識を克服することが目的。全部暗記する勢いで読む。
Sunshine 1 [平成28年度採用] 教科書 (当時使ってたのこれじゃないけど参考までに)
https://www.amazon.co.jp/dp/430408075X/
それから、冠詞のメカニズムを理解するために冠詞の本読んだ。
View deferred.ts
export default class Deferred<T> {
promise: Promise<T>
resolve: (value?: T | PromiseLike<T>) => void
reject: (reason?: any) => void
constructor() {
this.resolve = () => {}
this.reject = () => {}
this.promise = new Promise<T>((resolve, reject) => {
this.reject = reject;
View crawler.go
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
View tree_comparison.go
package main
import (
"fmt"
"golang.org/x/tour/tree"
)
//type Tree struct {
// Left *Tree
// Value int
View through2_spy.d.ts
/// <reference types="node" />
declare module 'through2-spy' {
import stream = require('stream');
function through2_spy(transform?: SpyFunction): stream.Transform;
type SpyFunction = (this: stream.Transform, chunk: any) => void;
export = through2_spy;
View rot13.go
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
View rot13.go
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
View word_count.go
import "strings"
func WordCount(s string) map[string]int {
counts := make(map[string]int)
words := strings.Fields(s)
for _, word := range words {
count, ok := counts[word]
if ok {
counts[word] = count + 1
} else {
@tai2
tai2 / errorLoggerMiddleware.ts
Created Apr 4, 2019
Dump stack trace to console when FSA contains an error.
View errorLoggerMiddleware.ts
import { Dispatch } from 'redux'
type ErrorAction = { payload: Error }
function isErrorAction(action: any): action is ErrorAction {
return (<ErrorAction>action).payload instanceof Error
}
const errorLoggerMiddleware = (store: any) => (next: Dispatch) => (
action: any
You can’t perform that action at this time.