Skip to content

Instantly share code, notes, and snippets.

View qyzhaojinxi's full-sized avatar
🎯
Focusing

EricZhao qyzhaojinxi

🎯
Focusing
  • 北京
View GitHub Profile
@qyzhaojinxi
qyzhaojinxi / 改变图片颜色
Created August 25, 2016 01:17
iOS改变图片颜色 #图片处理 #颜色 #iOS
//改变图片颜色
- (UIImage *)imageWithColor:(UIColor *)color
{
UIGraphicsBeginImageContextWithOptions(self.size, NO, self.scale);
CGContextRefcontext = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(context, 0, self.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
CGContextSetBlendMode(context, kCGBlendModeNormal);
CGRect rect = CGRectMake(0, 0, self.size.width, self.size.height);
CGContextClipToMask(context, rect, self.CGImage);
@qyzhaojinxi
qyzhaojinxi / 性能优化
Last active February 20, 2017 06:31
性能优化及测试方法 #性能优化
🌟性能优化
Android产品内存和cpu测试及优化方案
一、如何测试:
1.第三方平台测试:testin,腾讯u测
使用第三方平台工具测试当前app内存和cpu占用
GET /plus/v2whitelisted/people/lookup?includePeople=1&includeGal=1&type=phone&fields=kind,items(id,metadata(objectType,plusPageType,attributions),names,phoneNumbers(value,type,formattedType,canonicalizedForm),addresses(value,type,formattedType),images(url,metadata(container)),urls(value),placeDetails)&includePlaces=1&callType=outgoing&id=%2B441934834343 HTTP/1.1
Authorization: Bearer xxxxxxxxxREDACTEDxxxxxxxxxxxxx
User-Agent: Dalvik/2.1.0 (Linux; U; Android 6.0.1; Nexus 6 Build/MMB29S)
Host: www.googleapis.com
Connection: Keep-Alive
Accept-Encoding: gzip
HTTP/1.1 200 OK
Expires: Fri, 29 Jan 2016 12:47:28 GMT
@qyzhaojinxi
qyzhaojinxi / dummy-web-server.py
Created April 12, 2018 06:34 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost