Skip to content

Instantly share code, notes, and snippets.

View movii's full-sized avatar

movii movii

  • Shanghai, China
  • 07:55 (UTC +08:00)
View GitHub Profile
@movii
movii / schema-org-structured-data-markup-using-microdata.html
Created July 7, 2018 05:08 — forked from milanaryal/schema-org-structured-data-markup-using-microdata.html
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
@movii
movii / client.go
Created July 1, 2018 09:16 — forked from kenshinx/client.go
golang socket server & client ping-pong demo
package main
import (
"log"
"net"
"strconv"
"strings"
)
const (

Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

  1. Go to chrome://flags/#enable-devtools-experiments to enable Devtools experiments Chrome flags with Developer Tools Experiments enabled
  2. Open developer tools, go to Setting
@movii
movii / ssh_jumphost_config.txt
Created June 20, 2018 02:09 — forked from ebirn/ssh_jumphost_config.txt
ssh jump host forwarding config
#
# see also:
# https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing
# http://blog.scottlowe.org/2015/12/11/using-ssh-multiplexing/
#
# you may want to use connection multiplexing on the jumphost
Host jump-host
Hostname jump-host.example.com
ForwardAgent yes
ControlPath ~/.ssh/cm-%r@%h:%p
@movii
movii / config
Created June 18, 2018 15:34 — forked from sai92messy/config
SSH config for jump host
# ~/.ssh/config
Host jump
User ubuntu
HostName 12.345.67.89
IdentityFile /path_to/jump/pem_file
Host remote-server
User ubuntu
Hostname remote.server.domain
module.exports = {
- mode: 'development',
+ mode: process.env.NODE_ENV === 'production'
? 'production'
: 'development',
}
// ...
<template>
<div>
- <div>计数器值为: {{ count }}</div>
+ <div>{{ count }}</div>
<button @click="count++">计数器 + 1</button>
</div>
</template>
// ...
/* ... */
+ let webpack = require('webpack')
module.exports = {
/* ... */
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
+ publicPath: 'http://localhost:1333/dist/'
},
@movii
movii / counter.vue
Last active June 19, 2018 02:20
配合 Vue.js 配置 Webpack。原文:https://moxo.io/blog/2016/09/10/npm-vue-webpack/
<template>
<div>
<div>计数器值为: {{ count }}</div>
<button @click="count++">计数器 + 1</button>
</div>
</template>
<script>
export default {
data () { return { count: 0 } }
let path = require('path');
+ let VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
mode: 'development',
entry: './src/js/app.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},