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
<?xml version="1.0"?> | |
<!-- | |
List of KeyCode | |
https://github.com/tekezo/Karabiner/blob/version_10.4.0/src/bridge/generator/keycode/data/KeyCode.data | |
List of ModifierCode | |
https://github.com/tekezo/Karabiner/blob/version_10.4.0/src/bridge/generator/keycode/data/ModifierFlag.data | |
List of ConsumerKeyCode | |
https://github.com/tekezo/Karabiner/blob/version_10.4.0/src/bridge/generator/keycode/data/ConsumerKeyCode.data | |
List of PointingButton | |
https://github.com/tekezo/Karabiner/blob/version_10.4.0/src/bridge/generator/keycode/data/PointingButton.data |
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 -*- | |
""" | |
ProxyBrowser for splinter(0.7.4) on python2.7 | |
Working on Chrome and Phantomjs | |
""" | |
from functools import partial | |
from selenium import webdriver | |
from splinter import Browser |
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 -*- | |
from PIL import Image | |
CHARS = list("""MNHQ$OC?7>!:-;. """) | |
CHARS_N = len(CHARS) | |
WIDTH = 40 | |
HEIGHT = 40 | |
def rgb2char(r, g, b, alpha=256): |
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 -*- | |
""" | |
* 关于坚果云的 Webdav 的配置可以参看: https://griddiary.uservoice.com/knowledgebase/articles/478287-%E5%9D%9A%E6%9E%9C%E4%BA%91-webdav-%E8%AE%BE%E7%BD%AE%E6%95%99%E7%A8%8B | |
* 使用前请先安装 `easywebdav` : ``pip install easywebdav`` | |
坚果云 Webdav | |
============ | |
假设有下面的坚果云目录结构 |
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
const http = require('http'); | |
const puppeteer = require('puppeteer'); | |
const ORIGINAL_DATA = Buffer.from(JSON.stringify({'msg': '测试'})); | |
function serve() { | |
http.createServer(function (req, res) { | |
// The correct header should be 'application/json; charset=utf-8' | |
// but I change it to 'text/plain' to REPRODUCE THE BUG |
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
%{IP:remote} - %{USER:user} \[%{HTTPDATE:time}\] \"%{WORD:method} %{URIPATHPARAM:uripath} %{WORD:proto}\/%{NUMBER:proto_ver}\" %{NUMBER:status_code} %{NUMBER:body_length} |
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
# https://stackoverflow.com/a/66368555/5512649 | |
from typing import List | |
# problem description | |
class Object(object): | |
def __init__(self, integers): | |
self.integers = integers |