Skip to content

Instantly share code, notes, and snippets.

@proudzhu
proudzhu / xiaoxiao_tts.py
Created December 11, 2021 06:01 — forked from Dobby233Liu/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
@proudzhu
proudzhu / interleave.cpp
Created May 19, 2019 13:51 — forked from num3ric/interleave.cpp
In-place array interleaving
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <assert.h>
typedef std::chrono::high_resolution_clock Clock;
template<typename T>
@proudzhu
proudzhu / vimdiff.md
Created February 1, 2016 12:43 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

#!/bin/bash
shopt -s extglob nullglob
nc=0
cron=0
edit=0
fullshebang=0
lang=bash
user_editor=0
#!/usr/bin/bash
#
# Inspired by checkupdates shipped with pacman.
# Just add cower style output.
#
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
#
#!/bin/bash
DOM=(0xd4a8 0xd4a0 0xda50 0x5aa8 0x56a0 0xaad8 0x25d0 0x92d0 0xc958 0xa950
0xb4a0 0xb550 0xb550 0x55a8 0x4ba0 0xa5b0 0x52b8 0x52b0 0xa930 0x74a8
0x6aa0 0xad50 0x4da8 0x4b60 0x9570 0xa4e0 0xd260 0xe930 0xd530 0x5aa0
0x6b50 0x96d0 0x4ae8 0x4ad0 0xa4d0 0xd258 0xd250 0xd520 0xdaa0 0xb5a0
0x56d0 0x4ad8 0x49b0 0xa4b8 0xa4b0 0xaa50 0xb528 0x6d20 0xada0 0x55b0)
LMOY=(0x40 0x02 0x07 0x00 0x50
0x04 0x09 0x00 0x60 0x04
0x00 0x20 0x60 0x05 0x00
0x30 0xb0 0x06 0x00 0x50
@proudzhu
proudzhu / PKGBUILD
Created June 3, 2013 03:20
oxygen-transparent-git's PKGBUILD use pacman4.1 features
# Maintainer: Alessio Sergi <asergi at archlinux dot us>
pkgname=oxygen-transparent-git
_pkgname=oxygen-transparent
pkgver=227.34095be
pkgrel=1
pkgdesc="Oxygen style and decoration with support for transparency"
arch=('i686' 'x86_64')
url="https://projects.kde.org/projects/playground/artwork/oxygen-transparent"
license=('GPL' 'LGPL')
#!/bin/bash
#
# retreive aur comments for a package
# - package name can be specified or pulled from a PKGBUILD in $PWD
# - specify -a to show all comments
#
AURURL="https://aur.archlinux.org"
ALL='&comments=all'
@proudzhu
proudzhu / aurebuildcheck
Created May 11, 2013 06:45
A bash script checking aur (local) packages for needing rebuild
#!/bin/bash
#
#This Script is original written by matthiaskrgr(https://github.com/matthiaskrgr/aurebuildcheck).
#Modified by proudzhu(https://github.com/proudzhu/dotfiles/bin/aurebuildcheck)
#
export LANG=C
#color used by cower
NC="\033[0m"