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 UsersController < ApplicationController | |
requires_authentication [:index, :show] | |
def index | |
@users = User.order(:id) | |
respond_to do |format| | |
format.html | |
format.csv { send_data @users.to_csv } | |
format.xls # { send_data @users.to_csv(col_sep: "\t") } | |
end |
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
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
import kotlin.experimental.and | |
fun main(args: Array<String>) { | |
val hmacFromKomoju = "06cb40bd7c630613e41f874296eddd0153d023857a76a9de52daad5da6c2bbe4" | |
val algorithm = "HmacSHA256" |