Skip to content

Instantly share code, notes, and snippets.

@BurgerZ
BurgerZ / MiuiHome
Created November 22, 2014 08:31
Hide hotseats icons labels in MIUI v5 (maybe v6 too) with Xposed/WSM
private static void hideHotSeatsLabels() {
try {
Class.forName("com.miui.home.launcher.ShortcutIcon", false, mClassLoader);
XposedHelpers.findAndHookMethod("com.miui.home.launcher.ShortcutIcon", mClassLoader,
"onFinishInflate", new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
hide(param);
}
});
@BurgerZ
BurgerZ / gist:10498d3a348630058c70
Created October 28, 2015 05:35
iTools update disable (hosts)
127.0.0.1 itools.hk
127.0.0.1 update.itools.hk
127.0.0.1 ol-cn.itools.hk
127.0.0.1 serv2.itools.hk
127.0.0.1 stat2.itools.hk
127.0.0.1 serv-cn.itools.hk
127.0.0.1 www.1taoji.com
127.0.0.1 andrv.itools.hk
127.0.0.1 dl.itools.hk
127.0.0.1 lxcdn.slooti.com
@BurgerZ
BurgerZ / elk.md
Created December 17, 2015 07:21 — forked from nfarrar/elk.md
Setting Up a Private Elk Server

Private ELK Server

I needed a syslog server and had been reading about ELK for the past few months. I finally decided to throw together a basic implementation in my home lab. I've recorded my notes for this process in this document & dumped the notes online at the following locations:

The implementation I built is super basic, it's just in my lab for dev purposes atm - so I didn't finish securing or building the integrations - just needed it to visualize some syslog data ATM.

@BurgerZ
BurgerZ / gist:7045186
Created October 18, 2013 17:43
KMPlayer (Windows) ads removal
%WINDOWS%\Syatem32\drivers\ets\hosts
add this line:
127.0.0.1 player.kmpmedia.net
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@BurgerZ
BurgerZ / SignedJar.java
Created January 8, 2018 19:10 — forked from mmuszkow/SignedJar.java
Signed JAR
package ch.cern.test.mdm.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.Security;
@BurgerZ
BurgerZ / repo-reset.md
Created January 15, 2018 16:58 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@BurgerZ
BurgerZ / PreferenceFragment.java
Created February 22, 2018 08:18 — forked from cbeyls/PreferenceFragment.java
A PreferenceFragment for the Android support library. Based on the platform's code with some removed features and a basic ListView layout.It uses reflection but works with every device I've tested so far.
package android.support.v4.preference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
@BurgerZ
BurgerZ / Moon.swift
Created April 27, 2020 20:04 — forked from maxhuk/Moon.swift
Extended moon phase utils
/** Extended moon phase utils
Ported from https://github.com/solarissmoke/php-moon-phase/blob/master/Solaris/MoonPhase.php
Maksym Huk 2017
*/
import Foundation
import SwiftMoment
class Moon {