Skip to content

Instantly share code, notes, and snippets.

View yeyuguo's full-sized avatar
🎯
Focusing

Struggling Youth yeyuguo

🎯
Focusing
  • ...
  • China-BeiJing(Now)
View GitHub Profile
@yeyuguo
yeyuguo / scroll_caculate.js
Last active March 27, 2019 02:43
计算滚动到浏览器底部
// 参考文章:https://www.jianshu.com/p/0a3aebd63a14
const el = document.getElementById('#container') || document.body
if( getScrollTop(el) + getWindowHeight(el) >= getScrollHeight(el) ){
console.log('触发某些东西')
}
// y轴
function getScrollTop(el) {
@yeyuguo
yeyuguo / koa router
Last active February 8, 2019 08:54
koa 请求参数查看
const Koa = require('koa')
const Router = require('koa-router');
const app = new Koa();
const router = new Router();
router.get(
'/csrf',
(ctx, next) => {
@yeyuguo
yeyuguo / ad_urls.json
Created November 24, 2018 07:09 — forked from youfou/ad_urls.json
响应好友请求 / 自动聊天 / 限制频率 / 邀请入群 / 远程群管理 / 新人欢迎消息 / 关键词问答 / 发心跳 / 远程命令 / 远程执行代码
{
"xiaohongshu.com": "小红书",
"vip.com": "唯品会",
"douguo.com": "豆果美食",
"youshu.cc": "有书",
"missfresh.cn": "每日优鲜",
"qnr.io": "去哪儿",
"kaola.com": "网易考拉",
"waimai.meituan.com": "美团外卖",
"qcs.meituan.com": "美团打车",
@yeyuguo
yeyuguo / index.html
Created March 16, 2018 01:41 — forked from insin/index.html
Export a <table> to Excel - http://bl.ocks.org/insin/1031969
<!DOCTYPE html>
<html>
<head>
<title>tableToExcel Demo</title>
<script src="tableToExcel.js"></script>
</head>
<body>
<h1>tableToExcel Demo</h1>
<p>Exporting the W3C Example Table</p>
@yeyuguo
yeyuguo / 炫酷的图片浏览JS.js
Created March 5, 2018 09:09
可用来做图片的炫酷浏览
<!DOCTYPE html>
<meta charset="utf-8">
<title>Transform Transitions</title>
<style>
body {
margin: 0;
}
rect {
@yeyuguo
yeyuguo / class.html
Created February 6, 2018 12:57
JS 模拟生成类
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
var Class = (function () {
var _mix = function (r, s) {
@yeyuguo
yeyuguo / index.js
Created January 29, 2018 14:12
调试 express 的代码
/**调试 express 源码的调试代码 */
var express = require('express')
// express 初始化
var app = express()
// 使用 中间件
app.use('/users', function(req, res, next) {
// req.path will be the req.url with the /users prefix stripped
console.log('%s', req.path);
next();
@yeyuguo
yeyuguo / wx_analysis.py
Last active January 29, 2018 14:13
使用 python 代码 统计 微信的信息
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import itchat
import re
import jieba
def echart_pie(friends):
total = len(friends) - 1
#coding:utf-8
import re
def str2geo(string=u'114°52\'59.52"E',numType=True,decimal=5):
'''
# pdb.set_trace()
u'114°52\'59.52"E'
不返回 度分秒 刻读的
re.match(r'(.*)(?:[\xb0])(.*)(?:[\'])(.*)(?:[\"])([\w]?)',string)
1 2 3 4
返回 度分秒 刻读的
@yeyuguo
yeyuguo / emai_ssl.py
Last active September 3, 2017 08:39
python 邮件发送 SSL 方式的
#coding:urf-8
'''
该方式测试 没有成功
ssl 方式
'''
import email
import os
import email.mime.multipart
from email import encoders
from email.header import Header