Skip to content

Instantly share code, notes, and snippets.

View dragonwong's full-sized avatar
:octocat:
👈跟我一起画个🐉,在你👉画一道🌈

王大根 dragonwong

:octocat:
👈跟我一起画个🐉,在你👉画一道🌈
  • Beijing
View GitHub Profile
@huanggm
huanggm / base64.html
Last active June 4, 2024 08:52
收藏两种1像素图片的base64编码
<!-- 1像素透明 -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<!-- 1像素黑色 -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
<a href="http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html">参考网址</a>
@wintercn
wintercn / gist:5342839
Created April 9, 2013 03:55
取两个HTML节点最近的公共父节点
function getCommonParent(el1,el2){
var parents1 = [];
var el = el1;
while(el) {
parents1.unshift(el);
el = el.parentNode;
}
var parents2 = [];
var THRESHOLD = 150, DELAY = 15;
function initBigArrayAsync(max, cb) {
var r = [], i = 0;
function init(startTime) {
while (i < max) {
if (new Date - startTime < THRESHOLD) {
r[i++] = i;
} else {