Skip to content

Instantly share code, notes, and snippets.

@gboudreau
gboudreau / install-ffmpeg-amazon-linux.sh
Last active June 7, 2024 16:35
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
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
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@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);
@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.