Skip to content

Instantly share code, notes, and snippets.

View n9ti's full-sized avatar

Nati Namvong n9ti

View GitHub Profile
@n9ti
n9ti / config_index.js
Last active February 17, 2021 14:43
Setup Express.js with Vue.js SPA
// config/index.js
module.exports = {
// ...
dev: {
proxyTable: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
@n9ti
n9ti / highlight-matching-tag.json
Last active August 25, 2017 11:44
VSCode config
"highlight-matching-tag.style": {
"borderWidth": "0 0 2px 0",
"borderStyle": "solid",
"borderColor": "rgba(0,150,136,0.5)",
"backgroundColor": "rgba(62,69,81,0.2)"
},
"highlight-matching-tag.leftStyle": null,
"highlight-matching-tag.rightStyle": null,
@n9ti
n9ti / formatOnPaste
Created August 25, 2017 11:17
VSCode config
"editor.formatOnPaste": false,
@n9ti
n9ti / eslint.json
Created August 25, 2017 11:07
VSCode config
"eslint.validate": [
"javascript",
"javascriptreact",
"vue"
],
@n9ti
n9ti / emmet.json
Last active August 25, 2017 11:06
VSCode config
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
},
@n9ti
n9ti / vscode.json
Last active August 25, 2017 12:01
My vscode setting
{
"atomKeymap.promptV3Features": true,
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.renderLineHighlight": "gutter",
"editor.occurrencesHighlight": false,
"editor.selectionHighlight": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": false,
"emmet.syntaxProfiles": {
'atom-text-editor[data-grammar="source js jsx"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@n9ti
n9ti / index.html
Created October 7, 2015 19:02
learn-react
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>learn-react</title>
</head>
<body>
<div id="example"></div>
<script src="bundle.js"></script>
</body>
@n9ti
n9ti / main.js
Last active October 7, 2015 18:29
learn-react
// main.js
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('example')
);