Skip to content

Instantly share code, notes, and snippets.

@blueset
blueset / README.rst
Last active September 25, 2023 09:55
Filter: A demo of advanced user interaction with master channel through middleware.

Filter: A demo of advanced user interaction with master channel through middleware

Usage

  1. Place filter.py to your EFB_DATA_PATH/modules directory.
  2. Enable this middleware as filter.FilterMiddleware
  3. Send filter` to any chat for the filter control panel of the chat.
@shenqihui
shenqihui / object_entries.js
Last active May 31, 2019 08:22
WXS 中遍历对象
// 文件名应该是 object_each.wxs , github 上没法识别,所以直接用 js 后缀,如果name 中含有 " 引号,那就洗洗睡吧,不适合这样的业务。
// 匹配 key 的 regex
var keyRe = getRegExp('"[^"]+":', 'img');
// 匹配 name 替换的 regex
var replaceRe = getRegExp('[":]', 'img');
var objectEntries = function (target) {
var entries = [];
var targetString = JSON.stringify(target);
@BoGnY
BoGnY / README.md
Last active August 31, 2024 10:10
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@gboudreau
gboudreau / install-ffmpeg-amazon-linux.sh
Last active August 2, 2024 19:25
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF