Skip to content

Instantly share code, notes, and snippets.

View huuhoa's full-sized avatar

Huu Hoa NGUYEN huuhoa

  • VNG Corporation
  • Vietnam
View GitHub Profile
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="vn.com.vng.vmpay.ui.fragments.DepositFragment"
android:background="@color/bg_default">
<RelativeLayout
#!/bin/bash
for f in "$@"
do
path=${f%/*}
leaf=${f##*/}
if [[ "$path" == "$leaf" ]]
# f is basename only
then path=""
else path="${path}/"
fi

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@huuhoa
huuhoa / paxos.json
Last active September 4, 2020 02:24
Collection of articles on Paxos
{
"title": "Collection of articles on Paxos",
"author": "various authors",
"version": "v1.0",
"homepage": "paxos",
"output_dir": "paxos",
"urls": [
"https://medium.com/coinmonks/paxos-made-simple-3b83c05aac37",
"https://medium.com/@angusmacdonald/paxos-by-example-66d934e18522",
"https://medium.com/byte-me/paxos-in-plain-english-c5b2e1151b0b",
@huuhoa
huuhoa / day6_2.py
Created December 9, 2021 09:36
AoC 2021 - day 6 part 2
def advance_a_day(numbers):
counter = 0
for i in range(len(numbers)):
n = numbers[i] - 1
if n == -1:
n = 6
counter += 1
numbers[i] = n
return counter