Skip to content

Instantly share code, notes, and snippets.

View terrytowne's full-sized avatar

Terry Towne terrytowne

View GitHub Profile
  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

@terrytowne
terrytowne / messages.vue
Created May 22, 2016 23:36 — forked from niallobrien/messages.vue
Vue componet using a Feathers backend over websockets
<template>
<div>
<input type="text" placeholder="Enter message" v-model="newMessage" @keyup.enter="addMessage">
<button type="submit" @click="addMessage">Add message</button>
<ul>
<li v-for="message in messages">
<span @dblclick="editMessage(message)" v-if="message != editedMessage">{{ message.text }}</span>
<input
type="text"
v-model="message.text"
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>