Skip to content

Instantly share code, notes, and snippets.

@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active December 23, 2025 06:48
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@yisibl
yisibl / HTML-tags.md
Last active September 15, 2024 14:09
常用的 HTML 头部标签

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
@wintercn
wintercn / ktxp-thunder.js
Created November 17, 2013 16:33
糟糕的兴趣呢 嗯……
var names = [
/【猪猪字幕组】★4月新番 美食的俘虏Toriko 第\d*话/g,
/【Dymy字幕組】【魔笛_Magi 第二季】【\d*】/g,
/【Dymy字幕組】【東京暗鴉 Tokyo Ravens】【\d*】/g,
/\[OPFans枫雪动漫\]\[ONE PIECE 海贼王\]\[第\d*话\]/g,
/【极影字幕社】 ★物语系列/g
];
var request = new ActiveXObject("MSXML2.XmlHttp.6.0");
request.open("GET","http://bt.ktxp.com/index-1.html",false)
request.send(null);
@ebidel
ebidel / Web Components Resources.md
Last active March 23, 2026 03:02
List of resources related to Web Components
[
{
name:"HTML5",
uri:"http://www.w3.org/TR/html5/single-page.html",
category:"markup"
},
{
name:"HTML 5.1",
uri:"http://www.w3.org/TR/html51/single-page.html",
category:"markup"
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@lbj96347
lbj96347 / vim config
Last active October 9, 2024 07:58
vim config
syntax on " 语法高亮
" 设置文件编码为 utf-8
set encoding=utf-8
" 设置终端编码为 utf-8
set termencoding=utf-8
" 设置文件读写编码为 utf-8
set fileencoding=utf-8
" 设置文件编码自动检测顺序
set fileencodings=utf-8,latin1