Skip to content

Instantly share code, notes, and snippets.

View taka011239's full-sized avatar

takafumi tsuchida taka011239

View GitHub Profile

Virtual DOM and diffing algorithm

There was a [great article][1] about how react implements it's virtual DOM. There are some really interesting ideas in there but they are deeply buried in the implementation of the React framework.

However, it's possible to implement just the virtual DOM and diff algorithm on it's own as a set of independent modules.

@branneman
branneman / better-nodejs-require-paths.md
Last active May 15, 2025 11:17
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@nakaji-s
nakaji-s / gist:7969970
Last active August 31, 2020 02:02
Goと依存パッケージ管理

このgistは Cloud Foundry Advent Calendar 2013 の16日目の記事です。

はじめに

現在、CloudFoundryのComponentsはGo化しつつあります。それにより、Rubyで実装されていたものに対して性能向上していたり、ソースが読みやすくなっていたりする(こちらは主観ですが・・)半面、開発者にとっての課題も生まれています。その課題のひとつが__依存パッケージ管理__です。まずはRubyの外部パッケージ管理について簡単に振り返りつつ、Goのそれを見ていこうと思います。

依存パッケージ管理(Ruby)

Rubyでは外部パッケージはGemファイルとなっており、大抵の場合、Bundlerで管理します。また、最新版が動くとは限らないため設定ファイルにバージョンを指定してそれを使用します。Gemファイル自体はRubyGems.orgに置かれており、ここからダウンロードされます。

依存パッケージ管理(Go)

Goではソースコード中のimport句でパッケージを指定します。設定ファイルは使いません。以下に例を示します。

@mironal
mironal / code-quantity.sh
Created October 24, 2013 09:02
出っ出ーーwwwww 全然コーディングしてない人を晒し上げ奴wwwwwwwwwwwwwwwww
#!/bin/bash
#
# The MIT License (MIT)
# Copyright (c) 2013 mironal
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@shinyaohira
shinyaohira / Auto Layout Guide.md
Last active November 23, 2019 14:50
Auto Layout Guide
@voluntas
voluntas / shiguredojo.rst
Last active February 22, 2020 09:33
時雨道場
@voluntas
voluntas / shiguredo_tech.rst
Last active May 13, 2025 02:58
時雨堂を支える技術

時雨堂を支える技術

日時:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言語

@sunaot
sunaot / exception.md
Created August 2, 2013 09:13
例外設計の話

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

@Gab-km
Gab-km / whyILeftHeroku.rst
Last active December 30, 2022 10:56
何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

原著者:Adrian Holovaty
原文:Why I left Heroku, and notes on my new AWS setup

金曜日、私は Heroku から Amazon Web Services(AWS) を直接使うように Soundslice を移行しました。私はこの変更ができてとても、そうとても嬉しくて、私がどうやったかということと、もし皆さんが同じような立場だったら何故それを検討すべきかということについて広く伝えたいと思います。

@JakeWharton
JakeWharton / OkHttpStack.java
Created May 21, 2013 01:14
A `HttpStack` implementation for Volley that uses OkHttp as its transport.
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
* uses OkHttp as its transport.
*/