Skip to content

Instantly share code, notes, and snippets.

💭
❤️ 🐈

Masahiro Wakame vvakame

💭
❤️ 🐈
View GitHub Profile
@vvakame
vvakame / graphql-schema.js
Last active Jul 10, 2019
*.graphql to schema.json
View graphql-schema.js
// from https://blog.apollographql.com/three-ways-to-represent-your-graphql-schema-a41f4175100d
// https://blog.apollographql.com/modularizing-your-graphql-schema-code-d7f71d5ed5f2
const fs = require("fs");
const glob = require("glob");
const { graphqlSync, getIntrospectionQuery } = require("graphql");
const { makeExecutableSchema } = require("graphql-tools");
const typeDefs = glob
.sync("../graphql/*.graphql")
@vvakame
vvakame / index.ts
Created Dec 7, 2017
TypeScript + Redux なアレ(React+Redux 3日やってみはじめて期限に間に合わないと判断し作業をやめた人なので信頼性があるかは申し訳ないですが謎です…
View index.ts
import { createStore, applyMiddleware, combineReducers } from "redux";
import thunk from "redux-thunk";
import { userReducer, UserAction, UserState } from "./user";
import { handshakeReducer, HandShakeAction, HandshakeState } from "./handshake";
import { productInfoReducer, ProductInfoAction, ProductInfoState } from "./product";
import { circleReducer, CircleAction, CircleState } from "./circle";
export const store = createStore(combineReducers({
user: userReducer,
View index.ts
interface Hello {
hello(): string;
}
interface Named {
name: string;
}
function parrot<T extends Named>(obj: T): T {
return obj;
}
@vvakame
vvakame / index.js
Last active Nov 24, 2016
ECMAScript 2016 compatible class inheritance
View index.js
"use strict";
{ // sample
class Base {
static hello() {
return "test";
}
}
class Inherit extends Base {
}
View .gitignore
node_modules/
npm-debug.log
.vscode
*.js
@vvakame
vvakame / .gitignore
Last active Nov 3, 2016
SkateJS + TypeScript(TSX). see README.md
View .gitignore
node_modules/
.vscode/
npm-debug.log
index.js
index.jsx
View README.md

わからないエラーが出る。

$ go run main.go                                                                                                   1 ↵
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2167]

goroutine 1 [running]:
panic(0x8ef00, 0xc42000a0c0)
	/usr/local/opt/go/libexec/src/runtime/panic.go:500 +0x1a1
You can’t perform that action at this time.