Skip to content

Instantly share code, notes, and snippets.

View tai2's full-sized avatar

Taiju Muto tai2

View GitHub Profile
manabuyasuda /
Last active September 12, 2022 06:33







tos-kamiya / 👍
Last active November 19, 2018 10:36
View 👍

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


$ echo a > a.txt
$ echo b > b.txt
$ echo c > c.txt
$ cat a.txt b.txt c.txt
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 / gist:3d18659d2b3b0a2dd02b
Created November 17, 2014 23:22
three.js float texture
View gist:3d18659d2b3b0a2dd02b
<!DOCTYPE html>
<title>test float texture</title>
<meta charset="UTF-8">
<script src="//"></script>
<body style="margin:0; overflow:hidden;">
var renderer = new THREE.WebGLRenderer({ antialias:true, alpha:false });
patriciogonzalezvivo /
Last active February 21, 2024 11:27
GLSL Noise Algorithms

Please consider using 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

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 /
Last active January 4, 2024 14:02
When Active Record Child Objects are Autosaved in Rails


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


  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 /
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.