This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COMMAND="$1" | |
UANMEA=$(uname -a) | |
ARCH="x64" | |
DEST=$HOME/.config/clash/service | |
PLIST=/Library/LaunchDaemons/com.lbyczf.cfw.helper.plist | |
# if [[ $UANMEA == *"x86_64" ]]; then | |
# ARCH="x64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
public class ForegroundImageView extends ImageView { | |
private Drawable foreground; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
/** | |
* @author solo | |
*/ | |
public abstract class MagicArrayAdapter<T> extends ArrayAdapter<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateUtils { | |
public static String formatDateTime(Date date) { | |
String text; | |
long dateTime = date.getTime(); | |
if (isSameDay(dateTime)) { | |
Calendar calendar = GregorianCalendar.getInstance(); | |
if (inOneMinute(dateTime, calendar.getTimeInMillis())) { | |
return "刚刚"; | |
} else if (inOneHour(dateTime, calendar.getTimeInMillis())) { |