Skip to content

Instantly share code, notes, and snippets.

View nasum's full-sized avatar
🏠
Working from home

Masaya Nasu nasum

🏠
Working from home
View GitHub Profile
@nasum
nasum / file2.txt
Last active July 26, 2019 01:19
Goでコマンドラインツールを作るときの鉄板ライブラリ ref: https://qiita.com/nasum/items/f1911894802a2b92dc9e
$ go run main.go
root command
$ go run main.go --help
command line calculator
Usage:
culc [flags]
Flags:
@nasum
nasum / deferredTest.js
Last active May 12, 2019 10:45
jQueryのDeferredで並列処理を直列処理 ref: https://qiita.com/nasum/items/7c0e04f647ffdad1e5bc
exec1().then(exec2).then(exec3);
function exec1(){
var def = new $.Deferred();
//ajaxの処理と仮定
setTimeout(function(){
$('div#content').append('<p>exec1</p>');
def.resolve();
},3000);
resource "aws_vpc" "vpc" {
cidr_block = "10.0.0.0/16"
instance_tenancy = "default"
}
resource "aws_subnet" "public_subnet" {
vpc_id = "${aws_vpc.vpc.id}"
cidr_block = "10.0.16.0/20"
availability_zone = "ap-northeast-1a"
}
@nasum
nasum / .eslintrc
Last active December 25, 2018 01:07
Nuxt.js + TypeScript + ESLint をやる最小構成 ref: https://qiita.com/nasum/items/a1fc32e3540276161e59
{
"parser": "vue-eslint-parser", // パーサにvue-eslint-parserを指定しSFCをリント可能に
"parserOptions": {
"parser": "typescript-eslint-parser" // オプションでTypeScriptをパースできるパーサを指定
},
"extends": [
"eslint:recommended",
"typescript" // eslint-config-typescriptのルールを追加
],
"plugins": ["typescript"], // eslint-plugin-typescriptを指定
@nasum
nasum / file1.txt
Last active March 25, 2018 03:18
FlutterでFontAwesomeを使う ref: https://qiita.com/nasum/items/c381e6ebee8524ff0800
new RaisedButton.icon(
icon: new Icon(FontAwesomeIcons.google),
label: new Text('Sigin In Google'),
)
@nasum
nasum / TextForm.vue
Last active December 17, 2017 14:53
Vue.js用のFluxライクなライブラリVuexを試してみる ref: https://qiita.com/nasum/items/b2f11a392bf8fb125610
<template>
<div>
<input type="text" v-model="input" @keyup.enter="addTodo"/>
</div>
</template>
<script>
import store from '../store/';
export default {
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
@nasum
nasum / file0.html
Last active December 4, 2016 11:24
Vue.jsでMarkdownをパースするためのvue-markdownの紹介と絵文字サジェストを作った話 ref: http://qiita.com/nasum/items/ec53060b8ec5a3534aa4
<div id="app">
<h1>Vue Markdown Editor</h1>
<div class="editor-main">
<div class="main">
<textarea class="editor" v-model="source"></textarea>
<div class="preview">
<vue-markdown :source="source"></vue-markdown>
</div>
</div>
</div>
@nasum
nasum / app.js
Last active October 23, 2016 03:16
Vue.js で Hot Module Replacement をやってみた ref: http://qiita.com/nasum/items/66491fb8a270d01372e1
var Vue = require('vue/dist/vue.js')
var myComponent = require('./components/my_components.vue')
var vm = new Vue({
el: ".app",
components: {
'my-component': myComponent
}
})
@nasum
nasum / README
Created November 28, 2013 04:28
2013-11-28 1st
#D3.jsで円グラフを作図
D3.jsで円グラフを作図する。
グラフの中心にはパーセント表記の値が記述される。