Skip to content

Instantly share code, notes, and snippets.

View AEfremov's full-sized avatar
:electron:

Alexander Efremov AEfremov

:electron:
  • Saint Petersburg
View GitHub Profile
@stdpmk
stdpmk / test_login_flow.kt
Last active May 3, 2022 14:34
test_login_flow
data class ResultApi<T>(
val result: T,
val errorCode: Int = 0,
var errorMessage: String = ""
)
class ElectroMarketService {
suspend fun userLogin(login: String, pass: String): ResultApi<String> {
try {
delay(3_000)
@morcefaster
morcefaster / pros_are_nice.md
Last active September 28, 2025 04:43
Did anyone say drama?

Preface

Hello everyone. With Ceb drama getting so much traction, I decided to do what any rational person would do in this situation - download all public matches of all professional dota 2 players and then scan the all-chat for any racism or naughty naughty words, so the j͇͕͙ͣu͒͆s̼̠͍̖̮̳ͮ̃t̫̙̯͎ͬ̇̊̄iͨć̼͓ͬͨ͑ͣe͉̜̫̱̠̘̋̒ͅ can be upheld once and for all.

There are several nuances that stood in my way.

  1. Many professionals' pubs are kept private.
  2. Most of the trashtalk happens in ally chat, which isn't saved.
  3. Some of the trashtalk happens over mic... which again, isn't saved.
  4. Some of the trashtalk happens on smurf accounts, which I did not include here.
public String getTimestamp() {
DateTime post = new DateTime(1468973396572);
DateTime now = new DateTime();
Period period = new Period(post, now);
PeriodFormatter formatter;
if(period.getYears() != 0){
formatter = new PeriodFormatterBuilder().appendYears().appendSuffix("Y").printZeroNever().toFormatter();
}else if(period.getMonths() !=0){
@stkent
stkent / android_studio_shortcuts.md
Last active January 23, 2026 11:04
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@staltz
staltz / introrx.md
Last active May 3, 2026 02:38
The introduction to Reactive Programming you've been missing