Skip to content

Instantly share code, notes, and snippets.

looping looping84

Block or report user

Report or block looping84

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@liudongmiao
liudongmiao / highlight.js
Last active Dec 7, 2018
highlight word
View highlight.js
function highlightWord(root, word, className) {
// base on https://stackoverflow.com/a/10730063
// word is lower-case
var walker, textNodes = [];
walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, {
acceptNode: function (node) {
if (node.nodeType === Node.TEXT_NODE && node.textContent.toLowerCase().indexOf(word) >= 0) {
return NodeFilter.FILTER_ACCEPT;
} else {
View Find out git branch creator
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authordate refs/remotes
@edokeh
edokeh / index.js
Last active Jul 13, 2019
佛祖保佑,永无 BUG
View index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@cowboy
cowboy / HEY-YOU.md
Last active May 29, 2019
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
You can’t perform that action at this time.