Skip to content

Instantly share code, notes, and snippets.

View fanyer's full-sized avatar

Fy fanyer

  • Somewhere on Earth
View GitHub Profile
@fanyer
fanyer / multiple_ssh_setting.md
Created February 3, 2018 18:58 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@fanyer
fanyer / shadow-dom.md
Created December 11, 2017 17:51 — forked from praveenpuglia/shadow-dom.md
Everything you need to know about Shadow DOM

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

Shadow DOM fixes CSS and DOM. It introduces scoped styles to the web platform. Without tools or naming conventions, you can bundle CSS with markup, hide implementation details, and author self-contained components in vanilla JavaScript. - https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom

It's like it's own little world which hardly affects or gets affected by the outside world.

@fanyer
fanyer / ssl.md
Created December 10, 2017 07:51
为什么不应该用 SSL 翻墙

SSL 设计目标:

  1. 防内容篡改
  2. 防冒充服务器身份
  3. 加密通信内容

而翻墙的目标:

  1. 不被检测出客户端在访问什么网站
  2. 不被检测出服务器在提供翻墙服务

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@fanyer
fanyer / array.extensions.md
Created October 7, 2017 21:35 — forked from rwaldron/array.extensions.md
Array.from and Array.of
@fanyer
fanyer / .tmux.conf
Created June 2, 2017 06:34 — forked from zhasm/.tmux.conf
tmux config
#ctrl a
set -g prefix ^a
unbind ^b
bind a send-prefix
#此类配置可以在命令行模式中输入show-options -g查询
#set-option -g base-index 1 #窗口的初始序号;默认为0,这里设置为1
set-option -g display-time 5000 #提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒
set-option -g repeat-time 1000 #控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒
set-option -g status-keys emacs #操作状态栏时的默认键盘布局;可以设置为vi或emacs
set-option -g status-right "#(date +%H:%M' ')" #状态栏右方的内容;这里的设置将得到类似23:59的显示

Flat Notifications - FlatNotify.js v0.1

This is a Javascript plugin I am working on for floating notifications. It is a work in progress.

A Pen by Saransh Sinha on CodePen.

License.

@fanyer
fanyer / index.pug
Created December 15, 2016 19:02 — forked from anonymous/index.pug
Material Login Form
// Mixins
mixin input(type, label)
.input-container
input(type='#{type}' id='#{label}' required)
label(for='#{label}')=label
.bar
mixin button(text)
.button-container
button
span=text
@fanyer
fanyer / 404-svg.markdown
Created November 21, 2016 09:51 — forked from anonymous/404-svg.markdown
404 SVG
@fanyer
fanyer / index.html
Created November 21, 2016 02:25 — forked from anonymous/index.html
Tumblr iOS Loading animation in HTML & CSS
<ul>
<li></li>
<li></li>
<li></li>
</ul>