Skip to content

Instantly share code, notes, and snippets.

@yudenzel
yudenzel / EnableWindowsStore.reg
Last active July 16, 2019 06:24
Enable Software Installation in Windows Store
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DoNotConnectToWindowsUpdateInternetLocations"=dword:00000000
@yudenzel
yudenzel / wsl_color_config.reg
Created July 8, 2019 17:26
Refined color scheme for WSL window
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_TheDebianProject.DebianGNULinux_1.1.6.0_x64__76v4gfsz19hv4_debian.exe]
"ColorTable01"=dword:00ff5414
"ColorTable09"=dword:00ff5555
[HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc_ubuntu.exe]
"ColorTable01"=dword:00ff5414
"ColorTable09"=dword:00ff5555
@yudenzel
yudenzel / update_apt_sources.sh
Last active October 25, 2019 13:20
Use aliyun mirror for Ubuntu
sudo cp /etc/apt/sources.list /etc/apt/sources.bak.list
sudo sed -i 's#://.*.ubuntu.com#://mirrors.aliyun.com#g' /etc/apt/sources.list
sudo apt update
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
@yudenzel
yudenzel / ConHost.cpp
Created May 15, 2019 13:25
A wrap executable that keep the console if anything outputed.
#include <conio.h>
#include <tchar.h>
#include <strsafe.h>
#include <string>
#include <vector>
#include <Windows.h>
#define TCHAR_SPACE TEXT(' ')
@yudenzel
yudenzel / ServiceManager.java
Created May 7, 2019 09:45
Android ServiceManager
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class ServiceManager {
static final String TAG = ServiceManager.class.getSimpleName();
static Class sClass = null;
@yudenzel
yudenzel / VirusTotalUploader.py
Created April 18, 2019 03:26
VirusTotoal Uploader
#!/usr/bin/env python
import requests
import base64
import hashlib
import sys
import json
import os
@yudenzel
yudenzel / FileLogger.java
Created March 29, 2019 13:47
FileLogger.java
import android.util.SparseArray;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;
import static android.util.Log.ASSERT;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.os.Handler;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class TopActivityWatcher {