Skip to content

Instantly share code, notes, and snippets.

@GerrieWell
GerrieWell / switch_host.py
Created June 21, 2018 08:58
my python script for switching host
import easydict
import yaml
import argparse
config = easydict.EasyDict()
config.users_host_path = '/Volumes/more/source/ilotuo/gerrieSwitchhost/user.yaml'
config.host_path = '/etc/hosts'
config.host_prefix = '##user-mark'
def main():
@GerrieWell
GerrieWell / gist:6caf08ee84517e663f791b8d62399a64
Last active February 24, 2017 07:45
gfwlist_convertToSS.md
if __name__ == '__main__':
	f = open("./gfwlist20170118.js","rb");
	dest = open("./gfwlist_update.js","wb");
	while 1:
		line = f.readline();
		if not line:
 break;
@GerrieWell
GerrieWell / GLDrawer2D.md
Last active August 24, 2022 08:42
RecordSurfaceRenderHandler.md
public class GLDrawer2D {
	private static final boolean DEBUG = true; // TODO set false on release
	private static final String TAG = "GLDrawer2D";

	private static final String vss
		= "uniform mat4 uMVPMatrix;\n"
		+ "uniform mat4 uTexMatrix;\n"
		+ "attribute highp vec4 aPosition;\n"
		+ "attribute highp vec4 aTextureCoord;\n"
@GerrieWell
GerrieWell / SufraceEncoder.md
Last active November 9, 2018 12:31
SufraceEncoder.md
    public void drainAllEncoderMuxer(boolean endOfStream) {
        final int TIMEOUT_USEC = 10000;
        if (VERBOSE) Log.d(TAG, "drainAllEncoderMuxer(" + endOfStream + ")");

        if (endOfStream) {
            if (VERBOSE) Log.d(TAG, "sending EOS to mEncoder");
            mEncoder.signalEndOfInputStream();
        }
@GerrieWell
GerrieWell / ffmpegWritemp4Header.md
Last active June 2, 2016 11:16
ffmpeg 写mp4 header
@GerrieWell
GerrieWell / gist:c495a495ec8a9603fd14
Created October 23, 2015 03:07
My tool auto rigging
from AutoRig import *
scene.addAssetPath('mesh', 'mesh')
scene.addAssetPath('motion', 'ChrBrad')
scene.addAssetPath("script", "behaviorsets")
scene.addAssetPath('script', 'scripts')
scene.loadAssets()
autoRigPawn = scene.createPawn('autoRig0')
Process: QQ [3583]
Path: /Applications/QQ.app/Contents/MacOS/QQ
Identifier: com.tencent.qq
Version: 4.0.1 (17811)
App Item ID: 451108668
App External ID: 811585058
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: QQ [3583]
User ID: 501