Skip to content

Instantly share code, notes, and snippets.

View waylife's full-sized avatar
🎯
Focusing

RxRead waylife

🎯
Focusing
View GitHub Profile
@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); }'
@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