Skip to content

Instantly share code, notes, and snippets.

View sanak's full-sized avatar

Ko Nagase sanak

  • Georepublic Japan
  • Japan, Kansai
View GitHub Profile
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active July 23, 2024 09:31
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

@parmentf
parmentf / GitCommitEmoji.md
Last active July 26, 2024 15:56
Git Commit message Emoji
@smellman
smellman / maps.me.build_memo_osx.md
Last active January 20, 2016 05:55
build memo for Maps.ME in OSX

maps.me memo

build maps.me

install depend packages

brew install boost
brew install qt5
@minorua
minorua / script.js
Created December 1, 2017 04:08
[QGIS-tr] 翻訳集計スクリプト (年別翻訳者別)
// 翻訳集計スクリプト (年別翻訳者別)
// 1. 翻訳者情報付き翻訳データを取得(ブラウザで表示)
// https://www.transifex.com/api/2/project/QGIS/resource/qgis-application/translation/ja/strings/?details&last_update&user
// 2. ブラウザのコンソールで次のスクリプトを実行
var aggr = {};
JSON.parse(document.body.innerText).forEach(function (msg) {
var year = msg.last_update.substr(0, 4);
aggr[year] = aggr[year] || {total: 0};
aggr[year][msg.user] = (aggr[year][msg.user] || 0) + 1;
@rraval
rraval / postgres-collation.md
Last active December 6, 2023 16:25
PostgreSQL collation is a massive footgun

This is a slightly stripped down version from our internal bug tracker. The point of posting this publicly is part FYI, part peer review. I'm hoping someone can look at this, disagree, and tell me all the downsides of using the C locale or point out things I've misunderstood. The Recommendations section in particular is contextualized by our database serving a SaaS product for users from many different locales, thus making locale a render level concern. YMMV, caveat emptor, etc.


Collation defines the character ordering for textual data. For Postgres, https://www.postgresql.org/docs/current/static/locale.html:

The locale settings influence the following SQL features:

  • Sort order in queries using ORDER BY or the standard comparison operators on textual data
  • The upper, lower, and initcap functions
@AsgerPetersen
AsgerPetersen / notes.md
Last active April 27, 2024 13:27
Debugging QGIS 3.x python plugins on OSX using VS Code

Debugging QGIS 3.x python plugins on OSX using VS Code

Plugin

In QGIS install the plugin debugvs.

Python dependencies

The debugvs plugin needs the python module ptvsd to function. This module is not installed by default.

In principle you just pip install ptvsd in the python interpreter used by QGIS.

@mpppk
mpppk / clean_architecture.md
Last active July 27, 2024 06:23
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記:

フロントエンドの技術選定で考えること

Frontend Study 用

前提: フロントエンドは式年遷宮が有効である

  • DB を持たないため、表層の技術を交換するだけで済む
    • JSON API が実質的な分解点になっている
    • 近年ではモバイルアプリのために JSON API が切り離されていることが多く、ここの利用者になるだけでよい
  • Rails や PHP で ORM ヘルパーにべったりな場合に困難になる(クライアントで同等のバリデーションを再現する必要)