Skip to content

Instantly share code, notes, and snippets.

View kashewnuts's full-sized avatar

Kashun YOSHIDA kashewnuts

View GitHub Profile
@kashewnuts
kashewnuts / blog-webpack-2.md
Created April 21, 2024 16:20 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

Climbing History

クライミングの記録です。

略歴

RP OS/FL
外岩 二段 初段
ジム 二段 初段

Djangoバージョンアップやることまとめ

TL;DR

  1. 公式ドキュメント Django の新しいバージョンへの更新 で推奨されていることを実施しましょう。
  2. django-upgrade を使うと対応したバージョンに自動で対応できます。
  3. 使用しているPythonやデータベースが移行対象のDjangoで使用できない場合、同時もしくは先んじて対応が必要です。
  4. CI環境を整備して、継続してバージョンアップしやすい環境を保ちましょう。
  5. サードパーティとの戦い編

Djangoのバージョン情報について

Djangoの複数DBを使ったレプリケーション

要約

  • Django標準のDATABASESでDBを定義し、DATABASE_ROUTERSでルーティングを定義したクラスを書けばほぼ行けそう。
  • 3rd-Partyはレプリカ遅延のアプローチを提供しているので、使うならPJに合うものを選定・もしくは自前実装すること。

MySQLのレプリケーションについて

DjangoCongressJP2023に登壇しました

image

2023/10/7(土)にサイボウズさんの会場でDjangoCongress JP 2023に登壇しました。 当日はconnpass上の定員である100名以上の参加者の方々がいらしていたようです。 今回はトーク後にパーティーも開催され、終始楽しいひとときを過ごさせてもらいました。

@kashewnuts
kashewnuts / CocInfo.log
Created August 27, 2023 15:33
coc-prettierがあるとPythonファイルを開いたときにエラーになったのでログを残す
vim version: VIM - Vi IMproved 9.0 9001677
node version: v18.17.1
coc.nvim version: 0.0.82-3dc6153a 2023-07-21 00:22:17 -0500
coc.nvim directory: /Users/kashew/.cache/plugged/coc.nvim
term: vscode
platform: darwin
## Log of coc.nvim
2023-08-28T00:20:49.956 INFO (pid:54406) [extension:coc-git] - Looking for git in: git
@kashewnuts
kashewnuts / keybindings.json
Last active June 21, 2023 12:22
vscodevim用にカスタマイズしたkeybindings
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+n",
"command": "workbench.action.quickOpenSelectNext",
@kashewnuts
kashewnuts / input.scss
Created January 14, 2023 04:21
Generated by SassMeister.com.
$red: #ff1122;
#main {
witdh: 600px;
p {
margin: 0 0 1em;
em {
color: #f00;
}
}
@kashewnuts
kashewnuts / .bashrc
Last active June 30, 2022 14:45
peco & ghq でいい感じにした bashrc (関連部分だけ抜粋)
# bash history
export HISTSIZE=10000
export HISTCONTROL=ignoreboth # ignorespace+ignoredups = ignoreboth
export HISTIGNORE="ls:fg*:history*"
# peco
function peco-repo() {
local selected_file=$(ghq list --full-path | peco --query "$LBUFFER")
if [ -n "$selected_file" ]; then
if [ -t 1 ]; then
@kashewnuts
kashewnuts / vimrc
Created February 14, 2021 03:40
WSL2でopen-browser.vimを使うと画面が真っ黒になる件
set runtimepath^=~/.cache/plugged/open-browser.vim
let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)