Skip to content

Instantly share code, notes, and snippets.

View mattermon's full-sized avatar
🐴
I may be slow to respond.

mattermon

🐴
I may be slow to respond.
View GitHub Profile
@mattermon
mattermon / trial.md
Created July 20, 2022 02:29 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@mattermon
mattermon / For Mac 4.2.6 unlimited trial.md
Created July 20, 2022 02:28 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher,4.2.5,4.2.6,4.3.7,it's works , this is the way which makes Always in evaluation mode 。

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@mattermon
mattermon / getAppInfo.java
Created October 12, 2018 09:30
获取应用名/Label
private AppInfo getAppInfo() {
int INVALID_TEXTURE_ID = -1;
AppInfo appInfo = new AppInfo();
PackageManager pm = context.getPackageManager();
PackageInfo pi = pm.getPackageArchiveInfo(path, PackageManager.GET_ACTIVITIES);
pi.applicationInfo.sourceDir = path;
pi.applicationInfo.publicSourceDir = path;
int textureId = INVALID_TEXTURE_ID;
public static String getTopAppName(){
ActivityManager activityManager=(ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
String topPackage=activityManager.getRunningTasks(1).get(0).topActivity.getPackageName();
return topPackage;
}
@mattermon
mattermon / ReflectUtil.java
Last active December 22, 2017 03:00
反射调用代码
package com.example.dex.util;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class ReflectUtils {
/**
* Locates a given field anywhere in the class inheritance hierarchy.
* @param instance an object to search the field into.
fp = dlopen(soPath, 1);
if(fp){
onloadPtr = dlsym(fp, "JNI_OnLoad");
if(onloadPtr && onloadPtr(v17, 0) >= 65543){
printf("so load successfully");
}else{
printf("error wihle calling JNI_OnLoad");
}
}else{
printf("error while openning so");
@mattermon
mattermon / PicConverText.py
Created July 18, 2016 05:43 — forked from evi1m0/PicConverText.py
12306 新版验证码识别脚本;
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
# website=linux.im
'''
12306 Captcha Picture:
author: Evi1m0@20150316
1. Download Captcha
2. Pic Conver Text