Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

RxRead waylife

🎯
Focusing
View GitHub Profile
@waylife
waylife / gist:295591795509ca00b009350b229caa72
Created Mar 20, 2022 — 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
View gist:295591795509ca00b009350b229caa72
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); }'
@waylife
waylife / HanziToPinyin.java
Created Apr 7, 2017 — forked from D-clock/HanziToPinyin.java
从Android4.2.2原生系统中提取出来的汉字转换成拼音的方案,同时兼容国产ROM
View HanziToPinyin.java
/*
* 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 / HG261GSDecoder
Last active Mar 26, 2020
HG261GSDecoder for FiberHome HG261
View HG261GSDecoder
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)));
View LauncherUtil
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;
/**