- ThinReports 0.7.6
- Ruby 1.9.3, 2.0
- Rails 3.2, 4.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift File.expand_path(File.dirname(__FILE__) + '/lib') # << 必ず先頭に追加 | |
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# : | |
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined. | |
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooController < ApplicationController | |
def export | |
csv_data = CSV.generate do |csv| | |
# (CSV データを作る処理) | |
end | |
# exported という名前で cookie を作成 | |
cookies[:exported] = { value: 'yes', expires: 1.minutes.from_now } | |
send_data csv_data, disposition: 'attachment', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result: Avg. 89 seconds | |
$ ruby test.rb | |
user system total real | |
81.500000 0.320000 81.820000 ( 81.891870) | |
$ ruby test.rb | |
user system total real | |
93.640000 0.540000 94.180000 ( 95.164552) | |
$ ruby test.rb | |
user system total real |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git remote set-url origin git@git.example.com:foo/bar.git |
Shape::Interface/Internal
な実装(分ける必要なし)Shape::List
の実装が全体的にダメReport::Base.generate
の引数が混沌としすぎgenerator: {}, report: {}
$ rake db:schema:dump
$ rake db:test:prepare
OlderNewer