Skip to content

Instantly share code, notes, and snippets.

@yueyuzhao
yueyuzhao / across.client.js
Created August 28, 2018 13:06
代理翻墙 (nodejs实现)
// 客户端实现
const net = require('net')
const tls = require('tls')
const localServer = new net.Server()
localServer.on('connection', (socket) => {
socket.pause()
const context = {
@oliveratgithub
oliveratgithub / emojis.json
Last active April 19, 2024 05:47
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@kindy
kindy / a.ltp
Created June 24, 2012 14:55
在 ngx_lua 中实现类似 php 的被嵌入 html 功能
"abc"
<?= 124 ?>
<?= a ?>
<? local x = 12
if math.random(1, 5) > 1 then ?>
xxx
<? else ?>
yyy
<? end ?>
@mayli
mayli / zipdb.py
Created April 5, 2012 13:58
Use a zipfile store a dict like k-v database
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# zipdb.py
# Use a zipfile store a dict like k-v database.
# Known bug: duplicate key(filenames) allowed
#
# Copyright 2012 mayli <mayli.he@gmail.com>
#
@ifduyue
ifduyue / p_in_html.py
Created January 11, 2012 15:04
content between <p> and </p>
def txt_wrap_by(begin, end, html):
if not html:
return ''
start = html.find(begin)
if start >= 0:
start += len(begin)
end = html.find(end, start)
if end >= 0:
return html[start:end].strip()
@ipconfiger
ipconfiger / __init__.py
Created January 5, 2012 12:48
OAuth包,实现了sina,QQ,网易,搜狐的OAuth认证
# -*- Encoding: utf-8 -*-
import base64
import binascii
import cgi
import hashlib
import hmac
import logging
import time
import urllib
import urlparse