Skip to content

Instantly share code, notes, and snippets.

@prologic
prologic / LearnGoIn5mins.md
Last active January 13, 2026 22:47
Learn Go in ~5mins
@orimajp
orimajp / nuxt-api-call-promise-all.md
Last active March 22, 2021 08:43
Nuxt.jsにて複数のAPIをPromise.Allで呼び出す方法

Nuxt.jsにて複数のAPIをPromise.Allで呼び出す方法

概要

Nuxt.jsの画面表示時に必要なデータを得るためのAPI呼び出しが増えると画面描画が遅くなる問題を、APIをPromise.allで呼び出すことにより回避する。

API呼び出し処理を別関数にすることによりリロード処理にも利用可能となる。

実装サンプル

コンボボックスの選択肢をAPIから取得するという利用シナリオ。

@mizchi
mizchi / predict-frontend.md
Last active July 27, 2025 04:49
React のユーザーから見た今後のフロントエンドの予想

この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。

今のフロントエンドの分類

  • 古典的なサーバーサイド WAF への +α の味付け
  • 大規模なクライアントアプリケーション管理のための SPA
  • SEO / SSR を考慮した Node ヘヴィーな環境

他、提唱されてるパターン

@keyama4
keyama4 / no-cache-rest-client.js
Created November 3, 2018 09:12
axiosのIE11のキャッシュ問題対応実装例
import * as Axios from 'axios';
const CONFIG = Object.assign({
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const setNoCache = (config) => {
@fukuiretu
fukuiretu / index.d.ts
Last active November 27, 2021 15:57
Nuxt.jsで必要なTypeScriptの型定義
import Vue from 'vue'
import { Route } from 'vue-router'
import { Store } from 'vuex'
import { MetaInfo } from 'vue-meta'
import { AxiosInstance } from 'axios'
interface NuxtContext {
isClient: boolean
isServer: boolean
isStatic: boolean
@javilobo8
javilobo8 / download-file.js
Last active May 13, 2025 05:55
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@kymmt90
kymmt90 / git-reflog.md
Last active December 28, 2022 11:42
`git reflog` についてまとめてみる

git reflog についてまとめてみる

reflog とは

  • reflog(参照ログ)とは HEAD やブランチ先端の動きの履歴
    • 各個人のローカルリポジトリに存在
    • ブランチの切り替え、新たに加えられた変更のプル、履歴の書き換え、あるいは単なる新規コミットの実行などを記録
  • git reflog で HEAD の移動履歴を、git reflog <ブランチ名> でそのブランチ先端が指していたコミットの一覧を確認可能
    • HEAD@{5}: HEAD の五つ前の状態を示す