Skip to content

Instantly share code, notes, and snippets.

View xudaolong's full-sized avatar
🎯
Focusing

Dillon Xu xudaolong

🎯
Focusing
View GitHub Profile
import React from 'react'
import PropTypes from 'prop-types'
class %filltext&name=className% extends React.Component {
render () {
return <div />
}
}
%filltext&name=className%.propTypes = {}
const { publicRuntimeConfig: { apiBase } } = require('../../shared/config/env')
const wreck = require('@hapi/wreck')
const h2o2 = require('@hapi/h2o2')
const proxy = [
['/v1/{p*}', apiBase],
['/v2/{p*}', apiBase]
]
@xudaolong
xudaolong / Trie.js
Created May 27, 2019 02:30 — forked from deadlocked247/Trie.js
Trie implementation in ES6, good for string autocomplete
/* Class representing a Trie data structure */
export default class Trie {
/**
* Creates a Trie
* @return {Object} Trie
*/
constructor() {
this.words = 0;
this.prefixes = 0;
@xudaolong
xudaolong / on-change-url.js&env=plain
Created May 9, 2019 09:57
spa applicaiton listen url change|-|&tag=JS
import _ from 'lodash'
// eslint-disable-next-line no-undef
class URLChangeEvent extends HashChangeEvent {
get [Symbol.toStringTag] () {
return 'URLChangeEvent'
}
}
let urlCache = window.location.href
@xudaolong
xudaolong / example-date.txt
Last active December 10, 2019 02:07
|-|{"files":{"example-date.txt":{"env":"plain","abbr":"date\\"}},"tag":"Promotion"}
%date&format=YYYY-MM-DD&lang=zh-hk%
@xudaolong
xudaolong / sale-email.txt&env=plain&abbr=sale
Last active May 30, 2022 10:46
Fast promotion to other customers...|-|&tag=Promotion
Dear %filltext&name=customer&default=Mrs. Chen%:
We understand from your information posted on website that you are in the market for efficient tool. We would like to take this opportunity to introduce our studio and products, with the hope that we may work with Bright Ideas Imports in the future.
We are a professional tool development studio. We have enclosed our catalog, which introduces our studio in detail and covers the main products we supply at present. You may also visit our online studio introduction at https://once.work which includes our latest product line.
Should any of these items be of interest to you, please let us know. We will be happy to give you a quotation upon receipt of your detailed requirements.
%fillarea&name=supplement&default=If you like our studio's products, please support us.&rows=3&width=400%
%fillcheck&name=callback&default=We look forward to receiving your enquires soon.&isCheck=0&width=400%
Sincerely,
%fillmenu&name=who&default=Dillon&opt=Dillon&opt=Shmily%
git checkout %c%
@xudaolong
xudaolong / sql-select.txt
Last active February 19, 2021 02:30
|-|{"files":{"sql-select.txt":{"env":"plain","abbr":"sel"}},"tag":"SQL"}
select t.* from %c% t %c%;
git remote add origin https://github.com/once-work/oncework.git