This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
""" | |
lib/RedisSessionStore.py | |
~~~~~~~~~~~~~~ | |
Flask 0.7, session store in redis | |
ref by https://gist.github.com/994937 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh-CN"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script id="editor_upload_progress_tmpl" type="html/template"> | |
<div id="uploading_bar" class="loading-bar"> | |
<div class="progress progress-info progress-striped"> | |
<div class="bar" style="width:<%=percent%>%;"><%=percent%>% (<%=curFile%>/<%=fileCount%>)</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DictProxyObject(dict): | |
"""Container object for datasets: dictionary-like object that | |
exposes its keys as attributes.""" | |
def __init__(self, **kwargs): | |
dict.__init__(self, kwargs) | |
self.__dict__ = self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_dict_val(keys, dic, spliter='.'): | |
""" | |
get deep value of dict | |
etc: | |
get_dict_val('a.b.c', {'a':{'b':{'c':123}}}) # 123 | |
@keys: dict key list | |
@dic: dict object | |
@spliter: keys spliter default is '.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clash win desktop op | |
# Settings > Profiles > Parsers > Edit | |
# => copy & past & update the {{token url}} & close & update subscribe | |
parsers: # array | |
- url: {{ you tdy token url https://subscribe.*** }} | |
yaml: | |
prepend-rules: | |
- 'DOMAIN-SUFFIX,epicgames.com,POTATO CLOUD' | |
- 'DOMAIN-SUFFIX,epicgames.dev,POTATO CLOUD' | |
- 'DOMAIN-SUFFIX,microsoft.com,POTATO CLOUD' |