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
# Escape non-ASCII characters and forward slashes as unicode escape sequences, | |
# but with forward slashes instead of backslashes, since backslashes already have meaning | |
def asciiify(str) | |
str.unpack('U*').map { |i| | |
(i == 47 || i == 92 || i > 127) ? "/u" + i.to_s(16).rjust(4, '0') : i.chr | |
}.join | |
end | |
# Decode "forward slashed" unicode escape sequences | |
def deasciiify(str) |
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
/** | |
* Directory structure should be: | |
* - project_root | |
* - build.sbt (see below) | |
* - src | |
* - main | |
* - scala | |
* - S3Inspect.scala | |
*/ | |
package s3inspect |
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
/** Reads queue of new users to index */ | |
class NewUserQueue extends Actor with ActorLogging { ... } | |
object NewUserQueue { | |
case class Listen(ref: ActorRef) | |
case class NewUsers(users: Seq[User]) | |
} | |
/** Indexes documents for a new user */ | |
class UserIndexer extends Actor with ActorLogging { ... } |
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
@* Helper to draw <font> tags *@ | |
@font(size: Option[Int] = Some(12), bold: Option[Boolean] = Some(false), color: Option[String] = None) = {<!-- | |
--><font face='@Html(ctx.fontFace)'@{ if (color.isDefined) s" color='${color.get}'" else "" } style='@if(size.isDefined) { font-size: @{size.get}px; } @if(bold.isDefined) { font-weight: @{ if (bold.get) "bold" else "normal"}; }'><!-- | |
-->} | |
@* Draw a spacer cell with text inside so Outlook doesn't ignore it *@ | |
@spacerCell(width: Option[Any] = None, height: Option[Int] = None, rowspan: Int = 1, colspan: Int = 1, bgcolor: Option[String] = None) = { | |
<td rowspan=@rowspan colspan=@colspan@{ if (width.isDefined) s" width='${width.get}'" else "" }@{ if (height.isDefined) s" height='${height.get}'" else "" }@{ if (bgcolor.isDefined) s" bgcolor='${bgcolor.get}'" else "" } style='@{ if (height.isDefined) s"font-size: ${height.get}px; line-height: ${height.get}px;" else "font-size: 0; line-height: 0;" }'> </td> | |
} |
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
<tr> | |
<td height=20></td> | |
<td align='center' valign='middle'>A</td> | |
<td></td> | |
<td align='center' valign='middle'>B</td> | |
<td></td> | |
<td align='center' valign='middle'>C</td> | |
<td></td> | |
<td align='center' valign='middle'>D</td> | |
<td></td> |
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
<!-- Row 3 --> | |
<tr bgcolor='#e4f1f5'> | |
<td height=15></td> | |
<!-- Spanning empty --> | |
<!-- Spanning empty --> | |
<!-- Spanning filled --> | |
<!-- Spanning empty --> | |
</tr> | |
<!-- Row 4 --> |
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
<tr bgcolor='#e4f1f5'> | |
<td height=15></td> | |
<td rowspan=3></td> | |
<td rowspan=2></td> | |
<td rowspan=5 align='center' valign='top' bgcolor='#6db2c8'>5</td> | |
<td rowspan=4 align='center' valign='bottom'>1</td> | |
</tr> |
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
<table cellspacing=1 cellpadding=0 bgcolor='#e68265'> | |
<tr bgcolor='#e4f1f5'> | |
<td width=8 height=8></td> | |
<td width=32 height=8></td> | |
<td width=8 rowspan=6></td> | |
<td width=32 height=8></td> | |
<td width=8 rowspan=6></td> | |
<td width=32 height=8></td> | |
<td width=8 rowspan=6></td> | |
<td width=32 height=8></td> |