Skip to content

Instantly share code, notes, and snippets.

View tai2's full-sized avatar
🐢

Taiju Muto tai2

🐢
View GitHub Profile
@manabuyasuda
manabuyasuda / From-engineers-to-designers.md
Last active September 12, 2022 06:33
エンジニアからデザイナーに向けて、デザインカンプを作るときにしておいて欲しいこと。

エンジニアからデザイナーに向けて、デザインカンプを作るときにしておいて欲しいこと。

デザインカンプをコーディングするときに困りがちなことや、こうしてもらえると助かることなどをまとめています。デザイナーが他のデザイナーのデザインカンプを引き継ぐこともあるので、誰にとっても使いやすいデザインカンプを作ることは大切なことだと思います。

このドキュメントは指示ではなく、エンジニア目線の提案です。必ずしも正しいとは考えていませんし、このドキュメントをもとに意見を出し合えたらと思っています。

基本的にデザインカンプに残して欲しいとしていますが、共有されているのであればデザインカンプ以外でも構いません。デザイナーの頭の中にだけある状態はさけたいと考えているので、ストックしておく場所としてデザインカンプを選んでいます。

ツーツはPhotoshopを想定しています。これは単純にPhotoshopで作られることが多いからです。違うツールを使っている場合は、読み替えるか、読み飛ばしてください。

全体編

@tos-kamiya
tos-kamiya / 👍-gzip.md
Last active November 19, 2018 10:36
gzipの仕様は間違いなくプロの仕事

結論: gzip(map(zcat, f...)) = cat(f...) として扱える仕様

複数のファイルをcatししたものをgzipで固められる。当たり前

$ echo a > a.txt
$ echo b > b.txt
$ echo c > c.txt
$ cat a.txt b.txt c.txt
a
@kjlubick
kjlubick / LICENSE
Last active May 1, 2022 22:26
Exports a THREE.js scene mesh to STL, making it suitable for 3d printing
The MIT License
Copyright © 2010-2016 three.js authors
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@taka75
taka75 / gist:3d18659d2b3b0a2dd02b
Created November 17, 2014 23:22
three.js float texture
<!DOCTYPE html>
<html>
<head>
<title>test float texture</title>
<meta charset="UTF-8">
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"></script>
</head>
<body style="margin:0; overflow:hidden;">
<script>
var renderer = new THREE.WebGLRenderer({ antialias:true, alpha:false });
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 21, 2024 23:26
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@demisx
demisx / active_record_objects_autosave.md
Last active February 26, 2024 17:31
When Active Record Child Objects are Autosaved in Rails

belongs_to:

  1. Assigning an object to a belongs_to association does not automatically save the object. It does not save the associated object either.

has_one:

  1. When you assign an object to a has_one association, that object is automatically saved (in order to update its foreign key).
  2. In addition, any object being replaced is also automatically saved, because its foreign key will change too
  3. If either of these saves fails due to validation errors, then the assignment statement returns false and the assignment itself is cancelled.
  4. If the parent object (the one declaring the has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.
@nyergler
nyergler / maildir2mbox.py
Created January 31, 2012 05:39
Convert maildirs (including subfolders) to mbox format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Frédéric Grosshans, 19 January 2012
Nathan R. Yergler, 6 June 2010
This file does not contain sufficient creative expression to invoke
assertion of copyright. No warranty is expressed or implied; use at
your own risk.