Skip to content

Instantly share code, notes, and snippets.

View Wintus's full-sized avatar
📡
on the ground

wint Wintus

📡
on the ground
  • Tokyo
  • 19:20 (UTC +09:00)
  • X @wint7
View GitHub Profile
SELECT dt,
DATETIME_DIFF(DATETIME(dt), FIRST_VALUE(DATETIME(dt)) OVER (w), SECOND) /
DATETIME_DIFF(LAST_VALUE(DATETIME(dt)) OVER (wall), FIRST_VALUE(DATETIME(dt)) OVER (w), SECOND) AS progress
FROM UNNEST(GENERATE_DATE_ARRAY('2024-01-01', '2025-01-01')) AS dt
QUALIFY progress < 1
WINDOW w AS ( ORDER BY dt ),
wall AS ( ORDER BY dt ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING )
;
SELECT t,
@Wintus
Wintus / dump_route53_hosted_zones.sh
Last active January 20, 2022 09:35 — forked from sasasin/dump_route53_hosted_zones.sh
AWS Route 53 hosted zones 中身を全部出すやつ
#!/bin/bash -e
aws route53 list-hosted-zones-by-name --output text --query 'HostedZones[].Id' \
| xargs -I@ -P$(nproc) \
aws route53 list-resource-record-sets \
--hosted-zone-id @ \
--query 'ResourceRecordSets[].{name:Name,type:Type,records:ResourceRecords[].Value,alias:AliasTarget.DNSName}' \
| jq -r '.[] | . as $_ | .records[] | [ $_.name, $_.type, ., $_.alias ] | @tsv' \
| sort

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

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

@Wintus
Wintus / 0_reuse_code.js
Created March 31, 2016 02:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console