ctrl+b |
prefix | ||
---|---|---|---|
basic | session | ||
? |
Show shortcuts | s |
show all sessions |
: |
command mode | d |
Detach from session |
& |
Rename session | ||
window | pane | ||
c |
create | % |
splite left and right |
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 axios = require('axios').default; | |
const SlackBot = require('slackbots'); | |
const URL = 'https://api.ce-cotoha.com/api/dev/nlp/v1/sentiment'; | |
const COTOHA_TOKEN = process.env.COTOHA_TOKEN; | |
const SLACK_TOKEN = process.env.SLACK_TOKEN; | |
const USER_ID = process.env.USER_ID; | |
axios.defaults.headers.common['Authorization'] = `Bearer ${COTOHA_TOKEN}`; |
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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
Show hidden characters
{ | |
"extends": [ | |
"airbnb", | |
"plugin:prettier/recommended", | |
"prettier/react", | |
"plugin:node/recommended" | |
], | |
"env": { | |
"browser": true, | |
"commonjs": true, |
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
// 4月から計算一年内のもの | |
<!-- ・現在の日付が4月以降だったら | |
→4月から現在の日付カウントする | |
・現在の日付が3月以前だったら | |
→去年の4月から現在の日付までカウントする --> | |
private function isAnnual($date) | |
{ | |
$orderTime = $date->format('Y-m-d'); |
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
let data = { price: 5, quantity: 2 }; | |
let target = null; | |
let total = 0; | |
class Dep { | |
constructor() { | |
this.subscribers = []; | |
} | |
depend() { | |
if (target && !this.subscribers.includes(target)) { |
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 obj = [ | |
{ name: "Joe", age: 17 }, | |
{ name: "Bob", age: 17 }, | |
{ name: "Carl", age: 35 } | |
]; | |
const objRes = [...new Map(obj.map((item) => [item.age, item])).values()]; | |
const arrRes = [...new Set(obj.map((item) => item.age))] | |
console.log(objRes); //[{ name: "Bob", age: 17 },{ name: "Carl", age: 35 }] | |
console.log(arrRes);//[17, 35] |
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 React, { useState } from 'react' | |
const TodoItem = ({ index, name, complete, removeTodo, completeTodo }) => { | |
return ( | |
<> | |
<li style={{ textDecoration: complete ? 'line-through' : '' }}> | |
{name}{' '} | |
<span> | |
{!complete && <button onClick={() => completeTodo(index)}>finish</button>} | |
</span> |
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 React, { useState } from 'react' | |
const login = ({ username, password }) => { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
if (Object.is(username, 'bili') && Object.is(password, 'bili')) { | |
console.log(username, password) | |
resolve('success') | |
} else { | |
console.log(username, password) |
OlderNewer