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

CustomCellをxibで作ったときのmemo

1.StroyBoarでtableViewと追加。 dataSouceとdelegateを忘れず追加する 2. xibファイルを作る。 CustomTableViewCell.xibを作る ↓ クラス名を紐づける 3. import UIKit class ViewController: UIViewController { @IBOutlet weak var tableView: UITableView…

Swift+Crittercism導入メモ

crittercism上での操作 1)sign-in http://www.crittercism.com/ 2)アプリを作成する 3)app-settingsから Crittercism App IDを取得する アプリ上での操作 1)新しいプロジェクトを作成する 2)CocoaPodで「CrittercismSDK」をinstallする $cd workspace/crDemo…

react native 試したよ. の覚え書き

npmのアンインストール (nodebrewで管理したかったので元から入っていたnpmを一旦削除した) $ sudo npm uninstall npm -g $ sudo rm -rf ~/.npm nodebrew最新版のインストール $ nodebrew ls-remote $ nodebrew install-binary latest (又はバージョン指定) …

nginx + nginx-rtmp-module でストリーミング配信をする

nginxを予めyumでinstallしていた場合削除する yum remove nginx 必要なパッケージをyumでインストールしておく sudo yum install gcc wget pcre pcre-devel openssl openssl-devel ngix用のrtmpモジュールをcloneしてくる mkdir git cd git git clone https…

ffmpegのインストール〜HLS-Streaming再生まで

rpmの準備とgitでffmpegをcloneしてくる sudo yum install nasm git subversion yum-plugin-priorities sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm vim /etc/yum.repos.d/CentOS-Base.repo sudo y…

Railsで特定箇所だけBASIC認証

まず全体にbasic認証(実際使う場合はEnvなどからname/paswordを取得する) vim app/controllers/application_controller.rb class ApplicationController < ActionController::Base before_action :site_http_basic_authenticate_with def site_http_basic_au…

unicornの起動とnginxとの接続memo

テスト用のアプリ作成 $rails new unicorndemo -d mysql $cd unicorndemo gemrcの設定 vim .gemrc gem: --no-ri --no-rdoc gemの設定&インストール $vim Gemfile ---------------------- gem 'unicorn' ---------------------- $bundle install --path vendo…

capistranoのインストール+実行

インストール そのままインストールする場合 $gem install capistrano $cap -V Capistrano Version: 3.3.5 (Rake Version: 10.4.2) bundle installする場合はこっち $rails new capdemo -d mysql $cd capdemo $bundle install --path vendor/bundler $vim Ge…

Vagrant&VirtualBoxをインストール

VirtualBoxをインストール https://www.virtualbox.org/wiki/Downloads Vagrantをインストール https://www.vagrantup.com/downloads.html vagrantに仮装環境を追加 vagrant box add centos64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4…

Rails + Paperclipを試す

プロジェクトを新規作成 $rails new paperclipdemo -d mysql $cd paperclipdemo $bundle install --path vendor/bundler $rails s -p80 scaffoldを作成 $rails g scaffold events name:string $rake db:create $rake db:migrate Gemをupdate(PaperclipとAWS-…

resourcesメソッドを指定してRESTfulなルーティングを作る

1.Controllerの作成 $rails g controller books index show new crete edit destroy update 2.ルーティングを作成 vim config/routes.rb========================================= #既に作られているルーティングをコメントアウト(削除) #get 'books/index'…