Skip to content

Instantly share code, notes, and snippets.

View t-raku's full-sized avatar

Raku Takayama t-raku

  • Tokyo, Japan
View GitHub Profile
@t-raku
t-raku / ContentThumbnail-sample.vue
Created December 18, 2022 10:29
ボタヤマTVフロントエンド内コンポーネントの使用例
<template>
<div class="flex flex-col p-8 gap-8">
<div class="flex flex-col p-6 gap-6">
<div class="text-xl">一覧</div>
<div v-if="contents?.length" class="grid grid-cols-4 gap-4">
<div v-for="content in contents" :key="content.id">
<ContentHover :content="content" />
</div>
</div>
<h6 v-else class="text-xl">該当する動画がありませんでした。</h6>
@t-raku
t-raku / mongo.find.cursor.usecase.js
Last active February 22, 2018 05:02
a usecase of processing all documents from mongo for each time getting a document
// use of mongodb
//
let collection = mongoClient.db(databaseName).collection(collectionName);
let cursor = await collection.find();
while( await cursor.hasNext() ){
let document = await cursor.next();
};