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
require 'Axlsx' | |
mapping = {"Key 1"=> ['Val 1', 'Val 2', 'Val 3'], "Key 2"=> ['Val 1', 'Val 2', 'Val 3']} | |
Axlsx::Package.new do |p| | |
mapping.keys.each do |key| | |
p.workbook.add_worksheet(:name => "#{key}") do |sheet| | |
vals = mapping[key] | |
vals.each {|v| sheet.add_row ["#{v}"]} | |
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
test "404 for non existing user" do | |
{:ok, data} = Poison.encode(%{email: "nonexisting@user.com", password: "mypass"}) | |
assert conn() | |
|> put_req_header("content-type", "application/json") | |
|> post(session_path(@endpoint, :create), data) | |
|> json_response(:not_found) == %{} | |
end | |
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
### Keybase proof | |
I hereby claim: | |
* I am mlnkrish on github. | |
* I am mlnkrish (https://keybase.io/mlnkrish) on keybase. | |
* I have a public key whose fingerprint is 8E58 8E58 E446 059A 9C78 7A7C D505 CEB6 85C2 064F | |
To claim this, I am signing this object: |
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 android.content.Context; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import java.util.List; | |
public class DatabaseOpenHelper extends SQLiteOpenHelper { | |
final private static String NAME = "your_db"; | |
final private static Integer VERSION = Migrations.migrations.size();; |