Skip to content

Instantly share code, notes, and snippets.

View mopig's full-sized avatar
🎑
Nothing to do.

Lèo mopig

🎑
Nothing to do.
View GitHub Profile
@mopig
mopig / gen.js
Last active November 23, 2022 10:01
异步迭代模拟 10fastfingers.com/competition 用户输入
// Generate Function 实现 异步迭代
async function typeTest(gap, wait) {
const wordList = Array.from(row1.children).map((i) => i.innerText)
const len = wordList.length
const f = new KeyboardEvent('keyup', { keyCode: 32, which: 32 })
function* gen(gap) {
let i = 0
while (i < len && i * (gap + wait) <= 60 * 1000) {
@mopig
mopig / gist:82a0d55d227f989d13ca171ff3a79204
Last active September 5, 2020 01:13
📊 Weekly development breakdown
We couldn’t find that file to show.
@mopig
mopig / Twitter.md
Created June 19, 2020 13:43
Latest Twitter

Twitter

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mopig
mopig / profile-right.gif
Last active June 11, 2020 08:57
profile-right
profile-right.gif
@mopig
mopig / profile-left.gif
Last active June 11, 2020 14:27
profile-left
profile-left.gif
@mopig
mopig / test-001.js
Created September 19, 2018 11:04
snippet-js-test
const add = a => b => c => a + b + c;
export default add;
function MyObject(element) {
this.elm = element;
element.addEventListener('click', this.onClick.bind(this), false);
};
MyObject.prototype.onClick = function(e) {
var t=this; //do something with [t]...
//without bind the context of this function wouldn't be a MyObject
//instance as you would normally expect.
@mopig
mopig / 抓取页面url.py
Created January 15, 2014 07:57
【爬了个爬——学习Python网络爬虫】1.抓取页面 by:http://www.cnblogs.com/sayary/archive/2013/03/11/2952638.html
'''
Created on 2013-3-10
@author: gixiaochen
'''
import urllib2
from bs4 import BeautifulSoup
import re
siteUrls = " "
@mopig
mopig / shiny.css
Last active January 1, 2016 23:19
jsForBanma
body {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: rgba(0,0,0,.8);
}