View 👍-gzip.md

結論: 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
View LICENSE
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:
View gist:3d18659d2b3b0a2dd02b
<!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 });
View GLSL-Noise.md

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);
    return mix(rand(fl), rand(fl + 1.0), fc);
}
View active_record_objects_autosave.md

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.
View maildir2mbox.py
#!/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.