Skip to content

Instantly share code, notes, and snippets.

View xwsg's full-sized avatar
🎯
Focusing

xwsg xwsg

🎯
Focusing
  • Shandong, China
View GitHub Profile
@xwsg
xwsg / GoogleJava编程风格指南.md
Created April 13, 2017 11:04
GoogleJava编程风格指南

Google Java编程风格指南

前言

这份文档是Google Java编程风格规范的完整定义。当且仅当一个Java源文件符合此文档中的规则, 我们才认为它符合Google的Java编程风格。

与其它的编程风格指南一样,这里所讨论的不仅仅是编码格式美不美观的问题, 同时也讨论一些约定及编码标准。然而,这份文档主要侧重于我们所普遍遵循的规则, 对于那些不是明确强制要求的,我们尽量避免提供意见。

1.1 术语说明

@xwsg
xwsg / Intellij-IDEA-Keymap.md
Last active April 14, 2017 04:01
Intellij-IDEA快捷键

常用快捷键

快捷键 说明
Ctrl + H 类继承层次查看
Ctrl + N 快速打开类
Ctrl + Shift + N 可以快速打开文件
Ctrl + F 查找
Ctrl + R 替换
Ctrl + Q 查看JavaDoc
@xwsg
xwsg / Pattern.md
Last active May 28, 2017 02:31
Pattern name
holder
helper
provider
handler
extractor
validator
Comparator
Wrapper
Converter
@xwsg
xwsg / dropzoneDemo.html
Created June 17, 2017 04:08
Dropzonejs Demo
<html lang=zh-CN>
<head>
<title>Dropzonejs Demo</title>
<meta charset=utf-8>
<meta name="decorator" content="default"/>
<script src="https://cdn.bootcss.com/jquery/1.8.2/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/dropzone/5.1.0/min/dropzone.min.js"></script>
<link href="https://cdn.bootcss.com/dropzone/5.1.0/min/dropzone.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/2.3.0/css/bootstrap.min.css">
@xwsg
xwsg / Code_things.md
Last active July 18, 2017 08:16
Code things
@xwsg
xwsg / HTTP-Status-Codes.md
Last active August 31, 2017 03:52
HTTP Status Codes

From https://httpstatuses.com/

  • 1×× Informational
    • 100 Continue
    • 101 Switching Protocols
    • 102 Processing
  • 2×× Success
    • 200 OK
  • 201 Created
@xwsg
xwsg / Java8_lambda_Stream_API.md
Created September 19, 2017 01:42
Java 8 lambda Stream API学习总结

Stream

Stream分为中间操作(Intermediate operations)和终止操作(Terminal operations)

  • Intermediate:一个流可以后面跟随零个或多个 intermediate 操作。其目的主要是打开流,做出某种程度的数据映射/过滤,然后返回一个新的流,交给下一个操作使用。这类操作都是惰性化的(lazy),就是说,仅仅调用到这类方法,并没有真正开始流的遍历。常见操作有 map (mapToInt, flatMap 等)、 filter、 distinct、 sorted、 peek、 limit、 skip、 parallel、 sequential、 unordered。

  • Terminal:一个流只能有一个 terminal 操作,当这个操作执行后,流就被使用“光”了,无法再被操作。所以这必定是流的最后一个操作。Terminal 操作的执行,才会真正开始流的遍历,并且会生成一个结果,或者一个 side effect。常见操作有 forEach、 forEachOrdered、 toArray、 reduce、 collect、 min、 max、 count、 anyMatch、 allMatch、 noneMatch、 findFirst、 findAny、 iterator。

关于Short-circuiting

@xwsg
xwsg / vscode-Q&A.md
Last active October 31, 2017 05:42
vscode常见问题

1.格式化JSON

安装 Beautify 插件后,按键 F1 调出命令面板然后输入beautify,选择 Beautify selection 或者 Beautify file. Beautify 可以格式化 javascript, JSON, CSS, Sass, 和 HTML

@xwsg
xwsg / jenkins-compose.yml
Last active November 2, 2017 03:02
jenkins-compose.yml for jenkins
version: '3'
services:
jenkins:
image: jenkins/jenkins:lts
ports:
- "2017:8080"
- "50000:50000"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
@xwsg
xwsg / proxychains.md
Last active November 2, 2017 03:29
proxychains安装配置

1. 安装proxychains

sudo apt-get update
sudo apt-get install proxychains

2. 修改配置