Skip to content

Instantly share code, notes, and snippets.

View iamdaiyuan's full-sized avatar
💭
I may be slow to respond.

open-source-common-prosperity iamdaiyuan

💭
I may be slow to respond.
View GitHub Profile
@iamdaiyuan
iamdaiyuan / gh-check
Created December 30, 2020 13:14 — forked from lilydjwg/gh-check
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@iamdaiyuan
iamdaiyuan / gist:b6f1c1722b6204018859
Created February 4, 2015 07:58
启动Activity,并传递数据
// 启动一个activity
// 方便其他activity调用
// 这个方法写在activity自身,被其他activity调用
public static void actionStart(Context context, String newsTitle, String newsContent) {
Intent intent = new Intent(context, NewsContentActiviity.class);
intent.putExtra("news_title", newsTitle);
intent.putExtra("news_content", newsContent);
context.startActivity(intent);
}