This file contains hidden or 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
| case class Article(...); | |
| object Article { | |
| import DBUtil._ | |
| def delete(id: Long): Either[String, Boolean] = { | |
| withTransaction { implicit connection => | |
| SQL("DELETE FROM comments WHERE article_id = {id}").on("id" -> id).executeUpdate() | |
| SQL("DELETE FROM appusers WHERE id = {id}").on("id" -> id).executeUpdate( ) | |
| Right(true) |
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| A script to query the Amazon Web Services usage reports programmatically. | |
| Ideally this wouldn't exist, and Amazon would provide an API we can use | |
| instead, but hey - that's life. | |
| Basically takes your AWS account username and password, logs into the | |
| website as you, and grabs the data out. Always gets the 'All Usage Types' |
NewerOlder