Skip to content

Instantly share code, notes, and snippets.

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

legen legenself

🏠
Working from home
View GitHub Profile
@legenself
legenself / axios.options.md
Last active October 23, 2020 08:08
vuetify-template
prefix description scope
axios.options
axios 的基本配置
javascript,typescript
import axios from 'axios';
import store from '@/store'
@legenself
legenself / accumulate.md
Last active October 21, 2020 06:13
javascript
prefix description scope
js.accumulate
创建数组的部分和
javascript,typescript

Creates an array of partial sums.

  • Use Array.prototype.reduce(), initialized with an empty array accumulator to iterate over nums.
  • Use Array.prototype.slice(-1), the spread operator (...) and the unary + operator to add each value to the accumulator array containing the previous sums.
@legenself
legenself / weswag.schema.md
Last active October 21, 2020 05:55
we-swag
prefix description scope
weswag.schema
使用weswag生成接口访问模型
javascript,typescript,json
weswag.js -u http://132.232.166.224:8989/swagger/v1/swagger.json -t schemaTemplate  -p ./schemaprocess.js
@legenself
legenself / octokit.gist.md
Last active October 19, 2020 13:13
octokit
prefix description scope
octokit.gist
通过id获取用户的一条gist
javascript,typescript
octokit.gists.get({
    gist_id: id,
}).then(({ data }) => {
 console.log(data) 
@legenself
legenself / chalk.blue.md
Last active October 19, 2020 12:53
chalk
prefix description scope
chalk.blue
chalk blue
javascript,typescript
chalk.blue($1)
prefix description scope
program.command
函数响应命令行命令
javascript,typescript
program
    .command('action-name <param>')
    .description('action-description')
 .action(function(param) {
@legenself
legenself / lowdb.get.md
Last active October 19, 2020 12:45
lowdb
prefix description scope
lowdb.get
lowdb获取数据
javascript,typescript
db.get('$1').value()
prefix description scope
gist-header
snippet描述段
markdown
---
prefix: $1
description: $2
scope: $3
@legenself
legenself / wireframe-base.md
Last active October 20, 2020 11:00
vuetify-template
prefix description scope
vuetify.wireframe-base
base 线稿
vue
<template>
  <v-app id="inspire">
 
@legenself
legenself / vue.config.md
Last active October 20, 2020 10:49
electron vue config
prefix description scope
electron.vue.config
electron-vue config
javascript
module.exports = {
    pluginOptions:{
      electronBuilder:{
        builderOptions:{