- インスタンスを立てる
- 初期設定
# bashにする
$ sudo chsh isucon
Changing the login shell for isucon
Enter the new value, or press ENTER for the default
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install update-manager-core | |
sudo do-release-upgrade |
precision highp float; | |
precision highp int; | |
#define SHADER_NAME ShaderMaterial | |
#define GAMMA_FACTOR 2 | |
#define NUM_CLIPPING_PLANES 0 | |
uniform mat4 viewMatrix; | |
uniform vec3 cameraPosition; | |
#define TONE_MAPPING | |
#define saturate(a) clamp( a, 0.0, 1.0 ) | |
uniform float toneMappingExposure; |
vec3 getNormal(vec3 p) { | |
vec3 dx = dFdx(p); | |
vec3 dy = dFdy(p); | |
return normalize(cross(dx, dy)); | |
} |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 uv = fragCoord.xy / iResolution.xy; | |
vec4 color = texture2D(iChannel0, uv); | |
float gray = length(color.rgb); | |
fragColor = vec4(vec3(length(vec2(dFdx(gray), dFdy(gray)))), 1.0); | |
} |
// こちらに移動しました | |
// https://github.com/gam0022/slack-reply-and-quote-button |
// 3次正方行列の行列式をクラメルの公式で計算する | |
float det( vec3 a, vec3 b, vec3 c ) { | |
return (a.x * b.y * c.z) | |
+ (a.y * b.z * c.x) | |
+ (a.z * b.x * c.y) | |
- (a.x * b.z * c.y) | |
- (a.y * b.x * c.z) | |
- (a.z * b.y * c.x); | |
} |
public class DisplayToast implements Runnable { | |
private final Context mContext; | |
String mText; | |
public DisplayToast(Context mContext, String text){ | |
this.mContext = mContext; | |
mText = text; | |
} | |
public void run(){ |
[~/RubymineProjects/drwallet]$ rake db:migrate | |
== ChangeColumnsToCreditCards: migrating ===================================== | |
-- change_column(:credit_cards, :etc_issuance, :boolean) | |
rake aborted! | |
StandardError: An error has occurred, this and all later migrations canceled: | |
PG::Error: ERROR: column "etc_issuance" cannot be cast automatically to type boolean | |
HINT: Specify a USING expression to perform the conversion. | |
: ALTER TABLE "credit_cards" ALTER COLUMN "etc_issuance" TYPE boolean/Users/gam0022/RubymineProjects/drwallet/db/migrate/20150206071431_change_columns_to_credit_cards.rb:3:in `change' | |
Tasks: TOP => db:migrate |
gem 'rails', '4.0.0' | |
# Use sqlite3 as the database for Active Record | |
-gem 'sqlite3' | |
+gem 'sqlite3', groups: %w(test development), require: false | |
+gem 'pg', groups: %w(production), require: false | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.0' |