Skip to content

Instantly share code, notes, and snippets.

View rramsden's full-sized avatar
♨️
Keep On Keeping On

Richard Ramsden rramsden

♨️
Keep On Keeping On
View GitHub Profile
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
@rramsden
rramsden / main.kt
Last active March 27, 2020 05:45 — forked from anny0739/main.kt
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import kotlin.experimental.and
fun main(args: Array<String>) {
val hmacFromKomoju = "06cb40bd7c630613e41f874296eddd0153d023857a76a9de52daad5da6c2bbe4"
val algorithm = "HmacSHA256"