Skip to content

Instantly share code, notes, and snippets.

View w0rm's full-sized avatar
🧘
ヨガの呼吸

Andrey Kuzmin w0rm

🧘
ヨガの呼吸
View GitHub Profile
@pesterhazy
pesterhazy / building-sync-systems.md
Last active November 17, 2024 14:32
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@avh4
avh4 / Duckling.elm
Created December 12, 2020 22:29
Infinite ducklings
module Duckling exposing (main)
{-| This demo loads a convex shape and a mesh from the same OBJ file.
- elm-physics is used for simulation
- elm-3d-scene is used for rendering
It is important to keep the convex shape as small as possible, because
this affects the simulation performance.
@y047aka
y047aka / elm-meetup-planning.md
Last active September 30, 2019 10:05
2019年12月7日に予定しているイベントの企画書です

Elm Meetup Planning

アンドレイさんが来日する予定なので、東京滞在に合わせてイベントを開催する。
Elmでのグラフィック表現をテーマとして扱う。

Event:1

アンドレイさんの東京滞在最終日に合わせて開催する。(8日朝に東京を離れるとのこと)
Elm以外のコミュニティの人にも来てもらえるようにしたい。

@vurtun
vurtun / _GJK.md
Last active November 5, 2024 10:14
3D Gilbert–Johnson–Keerthi (GJK) distance algorithm

Gilbert–Johnson–Keerthi (GJK) 3D distance algorithm

The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.

Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.

@mattdesl
mattdesl / IceMaterial.js
Last active May 17, 2024 09:48
fast subsurface scattering in ThreeJS PBR material — see "TRANSLUCENCY" in the frag shader
const glslify = require('glslify');
const path = require('path');
const assign = require('object-assign');
const defined = require('defined');
// This is the original source, we will copy + paste it for our own GLSL
// const vertexShader = THREE.ShaderChunk.meshphysical_vert;
// const fragmentShader = THREE.ShaderChunk.meshphysical_frag;
// Our custom shaders
@WebReflection
WebReflection / state.js
Created May 13, 2016 10:16
Prototypal inheritance used to define states.
/*! (c) 2016 Andrea Giammarchi - MIT Style License */
// simple state-like objects handler
// based on prototypal inheritance
function State() {'use strict';}
// States are serializable dictionaries
// toJSON and toString are the only reserved keywords
// every other name can be used as name (included __proto__)
@yang-wei
yang-wei / destructuring.md
Last active November 3, 2024 16:23
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@alanpeabody
alanpeabody / my_app.ex
Last active July 18, 2024 05:22
Websockets in Elixir with Cowboy and Plug
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
])
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note