Skip to content

Instantly share code, notes, and snippets.

View zhiyue's full-sized avatar
🌻
just do it.

zhiyue zhiyue

🌻
just do it.
View GitHub Profile
@zhiyue
zhiyue / xiaoxiao_tts.py
Created April 7, 2022 07:30 — forked from Lulalaby/xiaoxiao_tts.py
superb edit of an old parameterless script
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""Edge Microsoft TTS for Python."""
import sys
from ws4py.client.threadedclient import WebSocketClient
import binascii
import argparse
import json
import requests
import re
@zhiyue
zhiyue / xiaoxiao_tts.py
Created April 7, 2022 06:59 — forked from xjohjrdy/xiaoxiao_tts.py
返回的音频没有文件头,所以我随便加的一个文件头,但显示的音频时长有问题。如果播放器不能正常播放,可以使用Chrome播放。
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from ws4py.client.threadedclient import WebSocketClient
import binascii
class WSClient(WebSocketClient):
def __init__(self, url, text, filename):
@zhiyue
zhiyue / setup-python3.8-via-ppa.sh
Created April 1, 2022 06:08 — forked from ptantiku/setup-python3.8-via-ppa.sh
Setup Python3.8 in Ubuntu Xenial (16.04 LTS). The python version was fixed at Python 3.5.1
#!/bin/sh
# install PPA
sudo add-apt-repository ppa:deadsnakes/ppa
# update and install
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv
# setup alternatives
@zhiyue
zhiyue / GitConfigHttpProxy.md
Created March 29, 2022 08:49 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@zhiyue
zhiyue / SpaceFn.json
Created November 2, 2021 06:37 — forked from tshu-w/SpaceFn.json
Karabiner Elements config to simulate SpaceLauncher
{
"title": "SpaceFN",
"rules": [
{
"description": "SpaceFN: Space enables SpaceFN mode (see: https://geekhack.org/index.php?topic=51069.0)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "spacebar"
@zhiyue
zhiyue / SpaceFn.json
Created November 2, 2021 06:37 — forked from tshu-w/SpaceFn.json
Karabiner Elements config to simulate SpaceLauncher
{
"title": "SpaceFN",
"rules": [
{
"description": "SpaceFN: Space enables SpaceFN mode (see: https://geekhack.org/index.php?topic=51069.0)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "spacebar"
connect_1 | 2021-08-16 07:28:05,406 INFO || Creating task mongo-material-0 [org.apache.kafka.connect.runtime.Worker]
connect_1 | 2021-08-16 07:28:05,407 INFO || ConnectorConfig values:
connect_1 | config.action.reload = restart
connect_1 | connector.class = io.debezium.connector.mongodb.MongoDbConnector
connect_1 | errors.log.enable = false
connect_1 | errors.log.include.messages = false
connect_1 | errors.retry.delay.max.ms = 60000
connect_1 | errors.retry.timeout = 0
connect_1 | errors.tolerance = none
connect_1 | header.converter = null
@zhiyue
zhiyue / logs.txt
Created August 13, 2021 10:10
debezium logs
connect_1 | 2021-08-13 09:06:08,829 INFO || [Worker clientId=connect-1, groupId=1] Successfully synced group in generation Generation{generationId=3,
memberId='connect-1-a15bceef-df8b-4325-85c0-6ae6a058401a', protocol='sessioned'} [org.apache.kafka.clients.consumer.internals.AbstractCoordinator]
connect_1 | 2021-08-13 09:06:08,829 INFO || [Worker clientId=connect-1, groupId=1] Joined group at generation 3 with protocol version 2 and got assignment: Assignment{error=0, leader='connect-1-a15bceef-df8b-4325-85c0-6ae6a058401a', leaderUrl='http://172.18.0.2:8083/', offset=4, connectorIds=[mongo-material], taskIds=[mongo-material-0], revokedConnectorIds=[], revokedTaskIds=[], delay=0} with rebalance delay: 0 [org.apache.kafka.connect.runtime.distributed.DistributedHerder]
connect_1 | 2021-08-13 09:06:08,831 INFO || [Worker clientId=connect-1, groupId=1] Starting connectors and tasks using config offset 4 [org.apache.kafka.connect.runtime.distributed.DistributedHerder]
connect_1 |
@zhiyue
zhiyue / linux configuration
Created August 7, 2021 08:12 — forked from leyafo/linux configuration
Remapping Capslock to control on Linux console
# You can use set keymap on X window easily, this configuration just tell you how to remapping the Capslock to control
# it based on these two articles:
# http://www.noah.org/wiki/CapsLock_Remap_Howto
# https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration
# we use loadkeys for setting.
# copy the `dumpkeys` output to our configuration file
sudo mkdir -p /usr/local/share/kbd/keymaps
@zhiyue
zhiyue / pragmatapro-font-lock-symbols-v2.el
Created June 30, 2021 08:33 — forked from DeLaGuardo/pragmatapro-font-lock-symbols-v2.el
Snippet for support ligatures from PragmataPro font in Emacs
;; Enable ligatures without prettify-symbols
(provide 'add-pragmatapro-symbol-keywords)
(defconst pragmatapro-fontlock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)