Skip to content

Instantly share code, notes, and snippets.

🖥
Free at night on work day.

Haruhi miao1007

🖥
Free at night on work day.
Block or report user

Report or block miao1007

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@miao1007
miao1007 / CMakeLists.txt
Created May 6, 2017
CMakeLists for Jamvm on Clion, no more red symbol
View CMakeLists.txt
cmake_minimum_required(VERSION 3.4)
project(jamvm_2_0_0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES
src/arch/arm.h
src/arch/i386.h
src/arch/mips.h
src/arch/parisc.h
View XMLUtils.java
package com.xxxx.xxxx.xxx.utils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
View BlurDrawable.java
package com.github.miao1007.myapplication;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
@miao1007
miao1007 / wallpaper.sh
Last active Apr 3, 2016
download himawari8 wallpaper for mac
View wallpaper.sh
#!/bin/sh
#delay 30 minute
delay=-v-30M
#image location
location=$HOME/Pictures/himawari8
date=$(date -u $delay "+%Y/%m/%d")
file_name=$(date -u $delay "+%H")$(echo "($(date -u $delay "+%M"))/10 * 10" | bc)"00_0_0.png"
url=http://himawari8-dl.nict.go.jp/himawari8/img/D531106/1d/550/$date/$file_name
@miao1007
miao1007 / install.sh
Created Nov 20, 2015
Install Golang on Mac
View install.sh
#!/bin/sh
#install go with brew
brew update
brew install go
#make go dir
cd ~
mkdir goroot
mkdir gopath
View APDUUtils.java
import okio.ByteString;
/**
* Created by leon on 8/23/15.
* 数据传输单元转换封装
*/
public class APDUUtils {
/**
* Eg: getBitInByte(0x80,7) == true
@miao1007
miao1007 / build.gradle
Created Sep 3, 2015
Retrofit 2.0 RxJava Sample
View build.gradle
dependencies {
compile 'io.reactivex:rxjava:1.0.12'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta1'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta1'
}
@miao1007
miao1007 / DownloadUtils.java
Last active Mar 29, 2019
Fir.im check for update
View DownloadUtils.java
/**
* Created by leon on 2/16/15.
* Download update apk with SystemService.
* require: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
*/
public class DownloadUtils {
public static String MINETYPE_APPLCATION = "application/vnd.android.package-archive";
public static long DownloadApkWithProgress(Context context, String url) {
View build.gradle
buildTypes {
release {
minifyEnabled true //run proguard
shrinkResources true
proguardFile 'proguard-square.pro'
// Default proguard files(including support libs)
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
@miao1007
miao1007 / FlyMeUtils.java
Last active Oct 31, 2015
flyme 魅族 状态栏适配 translucent
View FlyMeUtils.java
public class FlyMeUtils {
/**
* setDarkStatusBar on FlyMe
* 设置状态栏字体为暗色 仅魅族有效
*/
public static void setDarkStatusBar(Activity activity, boolean isDark) {
WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
try {
Class<?> instance = Class.forName("android.view.WindowManager$LayoutParams");
You can’t perform that action at this time.