Skip to content

Instantly share code, notes, and snippets.

View egoist's full-sized avatar
🙏
Please support my open-source projects!

EGOIST egoist

🙏
Please support my open-source projects!
View GitHub Profile

[slide]

hello world

const a = 1
let a = 1
var a = 1
@egoist
egoist / config.js
Last active March 18, 2017 07:25
docute post
docute.init({
nav: [{
path: '/get-started',
markdown: '**click** <button @click="count++">{{count}}</button>',
component: {
data: () => ({count: 0})
}
}]
})
@egoist
egoist / list.md
Last active March 3, 2017 14:15
The software used by @egoist
@egoist
egoist / quick-sort.js
Last active December 31, 2017 12:15
Sort
function quickSort(list) {
if (list.length < 2) {
return list
}
const candidate = list[list.length - 1]
const less = list.filter(i => i < candidate)
const greater = list.filter(i => i > candidate)
return [
{
"foo": "foo"
}
const Config = require('conpack')
const config = new Config()
module.exports = config
.entry('client')
.add('src/index.js')
.parent()
.entry('vendor')
.add(['vue', 'vuex'])

given:

{
  dist: /* @@dist */options.dist/* dist@@ */
}
replacer(input, {dist: 'dist'})
@egoist
egoist / vue-dom.js
Last active February 17, 2017 06:28
Unified way for bootstraping Vue.js app
import {render} from 'vue-dom'
const App = {
template: '<h1>hello world</h1>'
}
render(App, '#app')
// on the server
@egoist
egoist / vbuild.md
Created February 16, 2017 21:07
vbuild desktop notes

vbuild should be a dependency in the desktop app's app folder.

const extract = require('path-extract')
const params = extract('/user/:username', '/user/egoist')
console.log(params)
//=>
{
username: 'egoist'
}