Skip to content

Instantly share code, notes, and snippets.

View gam0022's full-sized avatar
😇
なの

がむ gam0022

😇
なの
View GitHub Profile
@havenwood
havenwood / additional_hash_methods.rb
Last active December 13, 2015 19:39
Hash#map_value, Hash#map_key, Hash#map_pair.
class Hash
def map_value
each_pair.with_object({}) do |(key, value), result|
result[key] = yield value
end
end
def map_key
each_pair.with_object({}) do |(key, value), result|
result[yield key] = value
@kaneta1992
kaneta1992 / three.js memo
Created January 10, 2016 10:59
three.js glsl組み込み定義
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME ShaderMaterial
4: #define VERTEX_TEXTURES
5: #define GAMMA_FACTOR 2
6: #define MAX_DIR_LIGHTS 0
7: #define MAX_POINT_LIGHTS 0
8: #define MAX_SPOT_LIGHTS 0
9: #define MAX_HEMI_LIGHTS 0
10: #define MAX_SHADOWS 0
GPA制度によって変わること

筑波大学は最近二学期制へと移行しはじめていて、色々大変なことになっています。 それと同時に GPA制度 なるものも導入されようとしています。 このGPA制度は平成25年度以降入学者用ですので、 現在在学している人間には関係のないことだと思います。

ここに書いてあることは、正しいつもりですが、

@jessykate
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created February 18, 2011 23:37
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texChecker;
uniform sampler2D texNoise;
@himaratsu
himaratsu / confwd_ninjinkun.md
Last active May 24, 2020 06:15
GitHub活動を通して個人のキャリアを詰みつつ仕事の成果を出す方法
@tmr111116
tmr111116 / gist:8282663
Created January 6, 2014 13:09
デフォルトの Mac で UTF-8 の BOM をつけるコマンド
cat <(printf "\xEF\xBB\xBF") 元のUTF-8ファイル.txt > BOM付きUTF-8ファイル.txt
@tsupo
tsupo / Twitter_API_1.1_rate_limit.txt
Created May 17, 2013 05:12
Twitter API 1.1 / 実行回数制限
Twitter API 1.1 の現行APIの制限
(REST API v1.1 Limits per window by resource)
https://dev.twitter.com/docs/rate-limiting/1.1/limits
・15分辺り最大何回実行できるか
Timelines
GET statuses/mentions_timeline 15回
GET statuses/user_timeline 180回/user, 300回/application
@0b5vr
0b5vr / genbun.glsl
Last active August 7, 2021 14:55
prod05 sierpinski chord by 0x4015完全理解した
// https://www.youtube.com/watch?v=H8UqnTE3mUY より引用
#define A for(int i=0;i<9;++i){int y=p>>((p>>19)+i&3),z=p*((878086607>>(i&7)*4)&15)*(510+1%5)>>14;if((p>>15&1<<(i&15))>0)s.y+=float(((y>>7&z*3|y>>11&z*6)&1023)-512)/3e4;}
vec2 mainSound(float t){int p=int(t*144e3);vec2 s;A;s.yx=s;p-=65536;A;return s*mat2(7,1,5,-3);}
// Commented version of https://twitter.com/zozuar/status/1441384708441456651
// Google-translated (with some editing) from @gam0022's version
float i, // Ray marching loop counter
e, // Volume density (the smaller the value, the higher the density)
s, // FBM scale (and loop counter)
g, // Ray's distance (also used for tunnel twirl and camera prespective)
k = .01; // Handy constant
// Ray marching loop