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
{ | |
"resourceKeyValues": { | |
"EDE_PROPERTY_ADDRESS": "999 Pine Ave." | |
}, | |
"symbolValues": { | |
"view_1.disclaimer_1": "Guaranteed or Your Money Back", | |
"agent_1.photo_1": "http://acme-broker.example.com/agents/agent-1.jpg" | |
} | |
} |
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 slick.driver.MySQLDriver.simple._ | |
import scala.slick.collection.heterogenous._ | |
import scala.slick.collection.heterogenous.syntax._ | |
import scala.slick.jdbc._ | |
// This is the large case class we are mapping -- 25 string fields: | |
case class BigData( | |
field1: String, | |
field2: String, | |
field3: String, |
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
// Please comment in case of typos or bugs | |
import scala.slick.driver.H2Driver._ | |
val db = Database.for...(...) | |
case class Record( ... ) | |
class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
... | |
def * = ... <> (Record.tupled,Record.unapply) | |
// place additional methods here which return values of type Column |
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
app.get('/proxied_image/:image_url', function(request_from_client, response_to_client){ | |
sys.puts("Starting proxy"); | |
var image_url = request_from_client.params.image_url; | |
var image_host_name = url.parse(image_url).hostname | |
var filename = url.parse(image_url).pathname.split("/").pop() | |
var http_client = http.createClient(80, image_host_name); | |
var image_get_request = http_client.request('GET', image_url, {"host": image_host_name}); | |
image_get_request.addListener('response', function(proxy_response){ |