Category | 参考 |
---|---|
HTTP | RFC2616 , Studying HTTP |
Cookie | RFC6525 , 徳丸氏 , Qiita |
Curl | 公式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const String50 = z.string().min(1).max(50).brand("String50") | |
type String50 = z.infer<typeof String50> | |
String50.parse("") // Parse Error | |
String50.parse("Hello") // String50 of "Hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doPost(e) { | |
// エクステンションから送信されたデータを取り出す | |
const params = JSON.parse(e.postData.getDataAsString()); | |
const title = params.title; | |
const url = params.url; | |
// スプレッドシートの最終行に書き出す | |
const sheet = SpreadsheetApp.openById('xxxxxxxxxxxxxxx').getSheetByName("xxxxx"); | |
sheet.appendRow([title, url]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns youglish | |
(:require [roam.datascript.reactive :as dr] | |
[roam.block :as block])) | |
;; utils | |
(defn get-parent-string | |
"Gets the string of the immediate parent block" | |
[block-uid] | |
(->> @(dr/pull '[{:block/_children [:block/string]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ls -ld /tmp | |
dr-xr-xr-x. 11 root root 4096 Aug 21 04:08 /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PasswordScoreProps = { | |
name: keyof Form; | |
control: Control<Form>; | |
children: (score: ZXCVBNScore) => ReactNode; | |
}; | |
function PasswordScore({ name, control, children }: PasswordScoreProps) { | |
const password = useWatch({ name, control }); | |
const score = zxcvbn(password).score; // 算出されたスコアを取得 | |
const childNode = useMemo(() => children(score), [children, score]); | |
// メモ化し、スコア変更時にだけ、子コンポーネント再描画 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// laravel artisan usage | |
// $cmd = "php " . base_path() . "/artisan calculate_bill:invoice_csv_send_email"; | |
<?php | |
namespace App\Traits; // FIXME your namespace | |
trait ExecutesCommand | |
{ | |
private static function executeOnAnotherProcessSync($cmd, array $args = []): void |
#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に感謝したいと思う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Hello world!"; |