This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Google Apps Scriptで議事録テンプレ作成を楽にした - Qiita - https://qiita.com/wiroha/items/5ce99d7bfc56e3270be6 | |
function onOpen() { | |
// Google Apps Scriptを使った独自メニューの作り方 - Qiita - https://qiita.com/howdy39/items/46ca1f2fd9d27eaba0c3 | |
const ui = DocumentApp.getUi(); // Uiクラスを取得する | |
const menu = ui.createMenu('日報'); // Uiクラスからメニューを作成する | |
menu.addItem('1日分を新たに作成', 'insertTemplate'); // メニューにアイテムを追加する | |
menu.addToUi(); // メニューをUiクラスに追加する | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | |
# -*- coding: utf-8 -*- | |
import os | |
import socket | |
import struct | |
import sys | |
import traceback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(1); | |
Promise.all([new Promise((resolve, reject) => { | |
console.log(3); | |
})]).then((values) => { | |
console.log(values); | |
}); | |
console.log(2); | |
// 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://jestjs.io/docs/en/api#describeeachtablename-fn-timeout | |
describe.each` | |
a | b | expected | |
${1} | ${1} | ${2} | |
${1} | ${2} | ${3} | |
${2} | ${1} | ${3} | |
`('$a + $b', ({a, b, expected}) => { | |
test(`returns ${expected}`, () => { | |
expect(a + b).toBe(expected); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const contentful = require("contentful"); | |
const client = contentful.createClient({ | |
// This is the space ID. A space is like a project folder in Contentful terms | |
space: "ra794i9t0yln", | |
// This is the access token for this space. Normally you get both ID and the token in the Contentful web app | |
accessToken: "U1Wffn5NIhptGsWKyliQCILCWpoaCjJK6mwJwYO_58g" | |
}); | |
// This API call will request an entry with the specified ID from the space defined at the top, using a space-specific access token. | |
client.getEntries() | |
.then((response) => console.log(response.items)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import EventEmitter from 'eventemitter3'; | |
class PromiseEmitter extends EventEmitter { | |
emit(event, ...args) { | |
let promises = []; | |
this.listeners(event).forEach((listener) => { | |
promises.push(listener(...args)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
originの状態を確認する | |
git remote show origin | |
pullやpushがどう紐付いているか確認できる | |
ローカルに作ったブランチをリモートに反映 | |
git push origin feature/a | |
リモートから削除されたブランチをローカルにも反映 | |
git fetch -p | |
これも同じみたい(プル?ン) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array = ['foo']; | |
array.hoge = 'hoge'; | |
// あくまでも配列の順番通りに変数が割り振られる | |
// foo という key を抜き取ってきているわけではない | |
const [ foo ] = array; | |
// hoge という key を取ってきている | |
const { hoge } = array; | |
console.log(foo); // foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('gui_macvim') | |
set transparency=10 | |
set guifont=Ricty\ Regular\ for\ Powerline:h13 | |
set guioptions-=T | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NeoBundle 'vim-airline/vim-airline' | |
NeoBundle 'vim-airline/vim-airline-themes' | |
"--------------------------------------------------------------------------- | |
" for bling/vim-airline {{{ | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
let g:airline_section_a = airline#section#create(['mode','','branch']) | |
let g:airline#extensions#tabline#enabled = 1 |