ぽんこつメモ

https://github.com/kanorimon

2013-01-01から1年間の記事一覧

JAWS-UG千葉團に行ってきたのです!

誰? いわゆるSEです。github:https://github.com/kanorimon 最近はトラック泊地にいます。#艦これ AWSとの関わり 業務:とあるユーザー会でRedshiftを調査中です。 趣味:スポットでBlenderのレンダリングクラスタを構築して動画を作ったりニコニコしたりし…

Amazon EC2を使って、3Dレンダリングをしてみたメモ

米国東部ヴァージニアリージョンにEC2コンピュータクラスタを作成 プレイスメントグループにインスタンス(マスター・スレーブ)を作成 AMIにWindows Server 2008 R2を選択 Administratorパスワードを取得 リモートデスクトップ接続する ファイアウォールの…

Unityのtoon shaderでalpha抜き

Shader "Custom/NewShader 2" { Properties { _Color ("Main Color", Color) = (0.5,0.5,0.5,1) _MainTex ("Base (RGB)", 2D) = "white" {} _Ramp ("Toon Ramp (RGB)", 2D) = "gray" {} } SubShader { Tags {"Queue"="Transparent" "RenderType"="Transparen…

heroku

CentOS開発環境からgithubにpush git push -u kanorimon master githubからWindowsにpull git pull github master Windowsからherokuにpush git push -u heroku master heroku rake:db migrate(モデル変更の場合) 環境変数設定 heroku config:add KEY=***

railsアプリ開発(もっと読む改善)

Ajaxでinsert,deleteすると、kaminariでは取得開始がずれます。 うまく回避する方法がわからなかったので、sessionを使って「もっと読む」を実装してみました。 index.html.erb <% if @count_memos == 0 %> <span>もうありません</span> <% else %> <%= link_to 'more', l…

railsアプリ開発(もっと読む)

kaminariで「もっと読む」を実装してみた。 Ajaxで書き換えた部分についてはhelperが効かないようなので、js.erbで最終ページか否かを判断しました。 index.html.erb <div id="posts"> <%= render @memos %> </div> <%= link_to_next_page @memos, 'more', :remote => true, :id =>…

railsアプリ開発(application.css)

requireの順番 bootstrap_responsiveは、最後に読み込む 以下のコードで読み込み順番を指定する *= require bootstrap.min *= require_self *= require default *= require bootstrap-responsive.min *= require_tree .

railsアプリ開発(paperclip)

imagemagickインストール # yum install ImageMagick ImageMagick-devel CentOS6系なのでyum、最新を使用する場合はソースからコンパイル paperclipインストール # vi Gemfile gem "paperclip", "~> 3.0" # vi config/enviroments/development.rb Paperclip.…

railsアプリ開発(ログインユーザsession)

ApplicationController helper_method :current_user private def current_user @current_user ||= User.find(session[:user_id]) if session[:user_id] end

railsアプリ開発(twitter投稿)

gemインストール # gem install twitter require controllerに以下のrequireを追加 require "twitter" ソース Twitter.configure do |config| config.consumer_key = ENV['CONSUMER_KEY'] config.consumer_secret = ENV['CONSUMER_SECRET'] config.oauth_tok…

railsアプリ開発(モデル変更)

モデル変更 # rails g migration add_column_name_to_tableName columnName:dataType # rails g migration remove_column_name_from_tableName columnName:dataType

railsアプリ開発(twitter認証)

gem # vi Gemfile gem 'omniauth'を追加 gem 'omniauth-twitter'を追加 developer登録 https://dev.twitter.com/apps/ 設定ファイル #vi config/initializers/omniauth.rb 設定内容(秘密情報は環境変数に設定する) Rails.application.config.middleware.us…

railsアプリ開発(Aptana)

Aptanaダウンロード 解凍 # unzip -q Aptana_Studio_3_Setup_Linux_x86_64_*.*.*.zip 実行 # cd Aptana_Studio_3 # ./AptanaStudio3

railsアプリ開発(github連携)

キーを作成 # ssh-keygen id_rsa.pubをGithubアカウントとのSSHKeyに登録 ローカルレポジトリをコミット # git init # git add . # git commit -m "first commit" リモートレポジトリを設定 # git remote add origin git@github.com:ユーザ名/レポジトリ名.g…

railsアプリ開発(準備)

アプリケーション作成 # rails new memoapp Gemfile編集 # vi Gemfile therubyracerのコメントアウトをはずす unicornのコメントアウトをはずす # bundle install データベース準備 # mysql -u root -p mysql> create database memoapp_db; database.yml設定…

Ruby開発環境構築(nginx)

リポジトリ追加 # rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm インストール # yum install nginx config設定 # vi /etc/nginx/nginx.conf 起動 # /etc/init.d/nginx start 自動起動設定 # chkco…

Ruby開発環境構築(Ruby)

gitの設定 # git config --global user.name <username> # git config --global user.email <email> rbenvのクローン作成 # git clone git://github.com/sstephenson/rbenv.git ~/.rbenv ruby-buildのクローン作成 # git clone git://github.com/sstephenson/ruby-build.git ~</email></username>…

Ruby開発環境構築(MySQL)

remiリポジトリを登録 # wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm # wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # rpm -i…

Ruby開発環境構築(git)

Gitバージョン確認 # git --version Git1.8インストール # cd src # wget http://git-core.googlecode.com/files/git-1.8.1.4.tar.gz # tar xzvf git-1.8.1.4.tar.gz # cd git-1.8.1.4 # ./configure # make # make install デフォルトで読み込まれるGitの修…

Ruby開発環境構築(サーバー準備)

VMWarePlayerにCentOS6.3をインストール VMWareToolsをインストール # mkdir src # cd src # tar xvzf '/media/VMware Tools/VMwareTools-9.2.2-******.tar.gz' # ./vmwaretools-install.pl CentOS再起動 パッケージアップデート # yum update 開発ツール一…