Skip to content

Instantly share code, notes, and snippets.

View YumNumm's full-sized avatar
:bowtie:

Ryotaro Onoue YumNumm

:bowtie:
View GitHub Profile
@migurski
migurski / gl-boilerplate.js
Created February 24, 2013 18:32
WebGL GeoJSON tile rendering
function linkProgram(gl, vsource, fsource)
{
if(gl == undefined)
{
alert("Your browser does not support WebGL, try Google Chrome? Sorry.");
throw "Your browser does not support WebGL, try Google Chrome? Sorry.";
}
var program = gl.createProgram(),
vshader = createShader(gl, vsource, gl.VERTEX_SHADER),
@msbarry
msbarry / README.md
Last active June 25, 2024 15:25
Visvalingam vs. Douglas-Peucker

Two well-known algorithms for polyline simplification are the Douglas Peucker and Visvalingam algorithms.

The Douglas Peucker algorithm uses a recursive divide-and-conquer approach. It starts by drawing a straight line from the first point to the last point. Then it finds the intermediate point that is furthest away from the straight line and deems this the "most important" and splits the polyline into two halves at that point. This process is repeated on both halves until the distance of the intermediate point is below a certain threshold, after which all points on that sub-polyline are thrown away since they have a negligible impact on the overall shape.

The Visvalingam algorithm works from the inside-out. It starts by computing the area of the triangle formed by each consecutive three points along the polyline. Then the midpoint of the triangle with the least area is thrown out since those three points are the closest to colinear and the area of triangles on either side are recomputed. The process

@shimizu
shimizu / .block
Last active May 29, 2024 04:38
バイナリベクトルファイル(pbf)の作り方
license: mit
height: 1200
@korya
korya / Mercator Projection.js
Created March 8, 2017 16:01
Mercator Projection for Google Maps JS SDK
// Base tile size used in Google Javascript SDK
const GOOGLE_BASE_TILE_SIZE = 256;
// MercatorProjection implements the Projection interface defined in Google Maps
// Javascript SDK.
//
// Google Maps Javascript SDK docs:
// https://developers.google.com/maps/documentation/javascript/maptypes#WorldCoordinates
//
// For more details about the convertions see
@manabuyasuda
manabuyasuda / Noto-Sans-Jp.md
Last active May 26, 2024 06:26
Noto Sans JPを使うための手順。

Noto Sans JP

Noto Sans JPをWebサイトで使う場合、大きく分けて2つの方法があります。

  1. CDNを使う場合
  2. サーバーにフォントファイルを置く場合

CDNの場合は、他のサイトを含めて一度でも読み込まれていればブラウザ側でキャッシュを持っているので、読み込み速度が速くなることが期待できます。
サーバーのフォントファイルはサブセット化(不要なデータを削除すること)でファイルサイズを削減できるメリットがあります。

基本的にはCDNを利用して、フォールバックとしてサーバーに置いたフォントファイルとシステムフォントを指定するのがいいでしょう。

@hankei6km
hankei6km / git-rebase--onto-tldr.md
Last active May 10, 2024 05:29
git のブランチを別のブランチへ付け替える (git rebase --onto)

git のブランチを別のブランチへ付け替える (git rebase --onto)

たまに --onto を使おうと思うと忘れているのでメモ.

基本(普通に rebase)

これを

%%{init: { 
@mpppk
mpppk / clean_architecture.md
Last active July 2, 2024 01:58
クリーンアーキテクチャ完全に理解した

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

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

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

2021/1/22追記:

@fatihyildizhan
fatihyildizhan / Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Last active October 22, 2023 11:58
Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Docker 23 + Traefik v2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Content:
- Ubuntu 22.04
- Docker Engine 23.0.3
- Docker Compose 2.17.2
- Traefik v1.7.18 with dnsChallenge
- Traefik v2.9.9 with httpChallenge
--
- Github Registry V2 ghcr.io
@klaszlo8207
klaszlo8207 / scaling_gesture_detector.dart
Last active August 16, 2022 00:44
Flutter ScalingGestureDetector for a 3D view (you can pan and zoom in/out)
import 'package:advert_app/utils/logging.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/gestures.dart';
class ScalingGestureDetector extends StatefulWidget {
final Widget child;
final void Function(Offset initialPoint) onPanStart;
final void Function(Offset initialPoint, Offset delta) onPanUpdate;
final void Function() onPanEnd;
.php
.html
.txt
.htm
.aspx
.asp
.js
.css
.pgsql.txt
.mysql.txt