Skip to content

Instantly share code, notes, and snippets.

View waylife's full-sized avatar
🎯
Focusing

R011 waylife

🎯
Focusing
View GitHub Profile
@waylife
waylife / LauncherUtil
Created March 14, 2015 09:42
ShortcutUtil
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.text.TextUtils;
/**
@waylife
waylife / HG261GSDecoder
Last active July 9, 2023 10:49
HG261GSDecoder for FiberHome HG261
public class HG261GSDecoder {
public static void main(String[] args) {
System.out.println("HG261GSDecoder v0.0.1(20160914) By RxRead");
System.out.println("http://blog.zanlabs.com");
// baseinfoSet_USERPASSWORD
String cipherText = "66&85&55&102&79&";
System.out.println(String.format("ciphertext=%s\ndecoder text=%s", cipherText, getPassword(cipherText)));
@waylife
waylife / HanziToPinyin.java
Created April 7, 2017 07:12 — forked from D-clock/HanziToPinyin.java
从Android4.2.2原生系统中提取出来的汉字转换成拼音的方案,同时兼容国产ROM
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@waylife
waylife / gist:295591795509ca00b009350b229caa72
Created March 20, 2022 14:22 — forked from bessarabov/gist:674ea13c77fc8128f24b5e3f53b7f094
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'