Skip to content

Instantly share code, notes, and snippets.

View SeniorZhai's full-sized avatar
🏠
Working from home

SeniorZhai SeniorZhai

🏠
Working from home
View GitHub Profile
@SeniorZhai
SeniorZhai / SerializeUtils.java
Last active August 29, 2015 14:05
Serialize管理工具类
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
public class SerializeUtils {
public static Object deserialization(String filePath) {
ObjectInputStream in = null;
@SeniorZhai
SeniorZhai / ResourceUtils.java
Last active August 29, 2015 14:05
Resource管理工具
public class ResourceUtils {
public static String getFileFromAssets(Context context,String fileName) {
if(context == null || TextUtils.isEmpty(fileName)) {
return null;
}
StringBuilder s = new StringBuilder("");
try {
InputStreamReader in = new InputStreamReader(context.getResources().getAssets().open(fileName));
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices