Skip to content

Instantly share code, notes, and snippets.

@shinofara
shinofara / file1.html
Created May 23, 2013 16:28
【メモ】【AngularJSのススメ】URLに応じて部分的に更新を行う方法(ルーティング)に関して ref: http://qiita.com/items/3f904e73a6eb1f929acd
when("/hoge", {
when("/hoge/:id", {
@shinofara
shinofara / file0.txt
Created May 14, 2013 08:11
selenium webdriverを使って、MacとLinux間でリモート、クライアントの関係を作成し、テストを実行するまで。Ruby Version ref: http://qiita.com/items/426b9d79fb1037b844e9
sudo su
cd /usr/local/src/
curl -O https://selenium.googlecode.com/files/selenium-server-standalone-2.32.0.jar
@shinofara
shinofara / file0.txt
Created April 23, 2013 06:53
Passengerをruby2.0,rails4に対応させる ref: http://qiita.com/items/4f9129c0b88ab934d901
sudo su
cd /usr/local/src/
git clone git://github.com/FooBarWidget/passenger.git
cd passenger/
gem build passenger.gemspec
gem install passenger-4.0.0.rc6.gem
@shinofara
shinofara / SpecRunner.html
Created April 21, 2013 14:21
javascriptの自動テスト化して楽をする!(まだβ版のjasmine-standalone-2.0.0を使ってるよ)導入編 ref: http://qiita.com/items/f1ad4e9331a11be20d66
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jasmine Spec Runner v2.0.0-alpha</title>
<link rel="shortcut icon" type="image/png" href="lib/jasmine-2.0.0-alpha/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="lib/jasmine-2.0.0-alpha/jasmine.css">
@shinofara
shinofara / file0.rb
Created April 20, 2013 17:45
RubyのAWS::S3を使ってS3の東京リージョンにファイル出来ない場合の対処法!! ref: http://qiita.com/items/371fd9c811929efcd182
# S3設定
AWS::S3::Base.establish_connection!(
:access_key_id => ACCESS_KEY_ID,
:secret_access_key => SECRET_ACCESS_KEY,
);
# 東京リージョンの場合設定値を置換します。
if REGION == "Tokyo" then
AWS::S3::DEFAULT_HOST.replace "s3-ap-northeast-1.amazonaws.com"
end
@shinofara
shinofara / .jshintrc
Created April 19, 2013 08:45
javascriptの自動テストに向けて、JSHintと呼ばれるJavascript用構文チェッカーを入れてみた。 ref: http://qiita.com/items/eeca05aaf556655b44f1
{
"indent" : 2, // インデント
"camelcase":true, // キャメルケース
"maxlen" : 80, // 一行の最大文字数
"unused" : true, // 宣言のみで使用していない変数を検出
"eqeqeq":true, // ==、!=の使用禁止
"undef" : true, // グローバル変数へのアクセスを禁止
"devel" : true // console、alertを許可
}
@shinofara
shinofara / file0.rb
Created April 18, 2013 04:08
capistrano経由でリモート環境でsudo実行する際に躓いた!! ref: http://qiita.com/items/7effc422b702e61870a4
set :user, "shinofara"
set :password, "password"
@shinofara
shinofara / file2.txt
Created April 12, 2013 10:19
需要は無いかもしれないが、ini形式をyaml形式に変換する処理を書いてみた。 ref: http://qiita.com/items/12cc1bf4b6e1c4ec5703
<?php
$ini = parse_ini_file($_SERVER['argv'][1],true);
foreach($ini as $section => $conf){
echo $section,":\n";
//sction内ループ
foreach($conf as $key => $val){
if(is_array($val)){
echo " ",$key,":\n";
foreach($val as $num => $file){
@shinofara
shinofara / file0.txt
Created April 10, 2013 15:45
YAMLに設定を持たせて、rubyでS3へファイルUP ref: http://qiita.com/items/84c9fdefae40e9190005
sudo gem i aws-s3
vim /usr/local/lib/ruby/gems/2.0.0/gems/sauberia-aws-s3-0.6.2.1254423624/lib/aws/s3/extensions.rb
@shinofara
shinofara / file0.txt
Created April 9, 2013 12:39
Githubへのpushを検知して、とある環境でpullするまでの一連の流れ ref: http://qiita.com/items/3b44c3787c67643dca6e
https://github.com/shinofara/<<Repository名>>/settings/hooks