Skip to content

Instantly share code, notes, and snippets.

View cymcsg's full-sized avatar

MarshalChen cymcsg

  • ClarityAI
  • Beijing,China
View GitHub Profile
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.Canvas;
@jodaka
jodaka / gist:f4d5998e6faaf97075ca
Created May 12, 2014 15:07
Webkit cookies proxy for android-async-http
/**
* We need dummy cookie storage that wouldn't save any cookies
* or get any cookies
*/
public class WebkitCookietHandlerProxy extends CookieHandler {
@Override
public void put(URI uri, Map<String, List<String>> responseHeaders) throws IOException {
if (uri == null || responseHeaders == null) {
# ASIA
_ = '173.194.36.%s' # del 印度 新德里
SG3 = '173.194.38.%s' # 新加坡
TW3 = '173.194.72.%s'
SG4 = '173.194.117.%s'
JP2 = '173.194.120.%s'
_ = '173.194.123.%s'
JP1 = '173.194.126.%s'
HK1 = '173.194.127.%s'
TW1 = '74.125.23.%s'
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten