Skip to content

Instantly share code, notes, and snippets.

View rosuH's full-sized avatar
👻
Wubba lubba dub dub

rosuH

👻
Wubba lubba dub dub
View GitHub Profile
@rosuH
rosuH / 204.sh
Created March 22, 2021 02:49
Captive portal flow Android 11.
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204

Keybase proof

I hereby claim:

  • I am rosuh on github.
  • I am rosuh (https://keybase.io/rosuh) on keybase.
  • I have a public key ASCdZSDVuBZw9BsDrM5AhkVsbvqasybrUqPKUFiGJGAElAo

To claim this, I am signing this object:

@rosuH
rosuH / .zshrc
Created February 23, 2021 09:48 — forked from gingerscallion/.zshrc
Proxy Settings for WSL2
# WSL2
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
alias www="https_proxy=\"http://${hostip}:8080\" http_proxy=\"http://${hostip}:8080\""
# or set it global
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
export https_proxy="http://${hostip}:8080"
export http_proxy="http://${hostip}:8080"
@rosuH
rosuH / multi_sign.sh
Last active January 18, 2021 08:53
APK signer scripts.
#!/bin/bash
# 对路径下所有安装包进行签名
# sign for all apk in specified path
function echoHelp() {
echo "Usage: $0 <unsignedFile PATH> <storeFile> <storePassword> <keyAlias> <keyPassword>"
}
if [[ ! -n $1 ]]; then
echoHelp
exit 0
@rosuH
rosuH / Trie.java
Created December 29, 2020 00:35
Trie
import java.util.TreeMap;
public class Trie {
private class Node {
public boolean isWord;
public TreeMap<Character, Node> next;
public Node(boolean isWord) {
this.isWord = isWord;
next = new TreeMap<>();
@rosuH
rosuH / Merger.java
Last active December 20, 2020 02:38
SegmentTree
public interface Merger<E> {
E merge(E a, E b);
}
@rosuH
rosuH / 📊 Weekly development breakdown
Last active June 23, 2023 00:22
Weekly development breakdown
Kotlin 1 hr 2 mins █████████████▏░░░░░░░ 62.8%
TypeScript 16 mins ███▍░░░░░░░░░░░░░░░░░ 16.4%
Properties 10 mins ██▎░░░░░░░░░░░░░░░░░░ 10.8%
Markdown 6 mins █▎░░░░░░░░░░░░░░░░░░░ 6.1%
Other 1 min ▎░░░░░░░░░░░░░░░░░░░░ 1.8%
@rosuH
rosuH / SightFragment.java
Created June 30, 2020 06:39 — forked from joinAero/SightFragment.java
Android - Fragment for handling view after it has been created and visible to user for the first time.
package cc.cubone.turbo.core.app;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
/**
* Fragment for handling view after it has been created and visible to user for the first time.
*
* <p>Specially in {@link android.support.v4.view.ViewPager}, the page will be created beforehand
@rosuH
rosuH / AdobeFixAMD
Last active March 24, 2020 16:11 — forked from XLNCs/AdobeFixAMD
To fix adobe products crashes on AMD hackintosh
___ADOBE CRASH FIX BY XLNC___
USAGE : Open terminal and run the below commands as required.
NOTE: File path changes in each version release. So if the file is not found you can find the specified file manually and replace the path in the below commands.
You can also use this command to find the location of a specific adobe file :
eg:- if you want to search for MMXCore then run this command :
find /Applications/Adobe* -type f -name "MMXCore" | sed 's/ /\\ /g'
Photoshop crash fix :-
@rosuH
rosuH / poster.py
Created September 17, 2019 04:39
FoodReminder
from datetime import date
import requests
import json
from apscheduler.schedulers.blocking import BlockingScheduler
from chinese_calendar import is_workday
# https://work.weixin.qq.com/help?doc_id=13376
wk_bot_url = $YOUR_WECHAT_BOT_URL
def postMsg():