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
fbettag@home .oO(~) $ siege -b http://172.16.1.5:8080/ | |
** SIEGE 2.70 | |
** Preparing 25 concurrent users for battle. | |
The server is now under siege...^C | |
Lifting the server siege... done. | |
Transactions: 977 hits | |
Availability: 100.00 % | |
Elapsed time: 11.40 secs | |
Data transferred: 2.97 MB | |
Response time: 0.29 secs |
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
abstract class MappedCIDR[A <: Mapper[A]](override val fieldOwner: A) extends MappedString[A](fieldOwner, 132) { | |
override val maxLen = 132 | |
override def fieldCreatorString(dbType: DriverType, colName: String): String = colName+" cidr" | |
} | |
abstract class MappedMAC[A <: Mapper[A]](override val fieldOwner: A) extends MappedString[A](fieldOwner, 18) { |
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
Menu.param[Customer]("Customer", "Customer", s => CustomerCache.find(s), | |
customer => customer.id.is.toString) / "customer" >> Hidden >> has_?(Administrator, Accounting), |
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
object NotificationCenter extends LiftActor with ListenerManager { | |
def createUpdate = "dummy" | |
override def lowPriority = { | |
case s: NotificationMessage => updateListeners(s) | |
} | |
} |
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
Starting Akka... | |
Running Akka 2.0-M1 | |
Deploying file:/usr/local/akka/deploy/akkaza_2.9.1-1.0.jar | |
[INFO] [12/19/2011 12:40:41.552] [main] [Remote] Starting remote server on [akka://[email protected]:2552] | |
Starting up ag.bett.scala.akkaza.AkkazaKernel | |
Successfully started Akka | |
[INFO] [12/19/2011 12:40:41.572] [DefaultDispatcher-17] [akka://[email protected]:2552/user/mgmt] Successfully linked up | |
[INFO] [12/19/2011 12:40:53.63] [DefaultDispatcher-6] [akka://[email protected]:2552/user/mgmt] Successfully linked up | |
[INFO] [12/19/2011 12:40:53.77] [DefaultDispatcher-14] [akka://[email protected]:2552/user/mgmt] rcvd: before | |
[INFO] [12/19/2011 12:40:53.84] [DefaultDispatcher-16] [akka://[email protected]:2552/user/mgmt] rcvd: after |
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
val record = MyMapper.find(By(MyMapper.id, 5)) | |
BHtml.text[Long, MyMapper](record) |
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
object MailHelpers { | |
import net.liftweb.util.Mailer | |
import net.liftweb.util.Mailer._ | |
def report(subject: String, msg: String) { | |
Mailer.sendMail( | |
From("report@yoursite", Full("From Name")), | |
Subject(subject), | |
To("service-ml@your-domain"), |
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
val props: Properties = System.getProperties() | |
props.put("mail.smtp.from", "[email protected]") | |
val session: Session = Session.getInstance(props, null) | |
val message = new MimeMessage(session) | |
message.setFrom(new InternetAddress("[email protected]", "This is my Name")) | |
message.addRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"))) | |
message.setSubject("Blubber") |
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 Category(name: String, treeName: String, slug: String, numEntries: Int = 0, categories: List[Category] = List()) { | |
def apply(x: Category): Category = { | |
this // merge x into this.categories to get a Tree-structure | |
} | |
} | |
case class CategoryTree(groups: Groups) { | |
val list: List[Category] = { | |
var res: Map[String, Category] = Map() | |
groups.groups.map(g => { |
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
00:13:12.562 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 72 Milliseconds | |
00:13:59.896 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 73 Milliseconds | |
00:14:35.034 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 81 Milliseconds | |
00:15:19.969 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 63 Milliseconds | |
00:16:41.198 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 74 Milliseconds | |
00:18:05.109 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 64 Milliseconds | |
00:18:34.023 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /item returned 200, took 86 Milliseconds | |
00:18:49.876 [btpool0-7] INFO net.liftweb.util.TimeHelpers - Service request (GET) /category returned 200, took 80 Milliseconds | |
00:19:41.314 [btpool |