Skip to content

Instantly share code, notes, and snippets.

Justin du Coeur, AKA Mark Waks jducoeur

Block or report user

Report or block jducoeur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Rebase to Master.md

Rebase to Master: the formula appears to be:

Make sure that we’ve on the PR branch:

git branch -av

If not already done, make sure the branch is compiling and testing cleanly, and that everything is checked in.

Check whether we have an upstream set:

@jducoeur
jducoeur / EventController.scala
Last active Aug 20, 2017
Working Event Controller
View EventController.scala
package controllers
import scala.concurrent.Future
import javax.inject._
import play.api.libs.json._
import play.api.mvc._
import scala.concurrent.{ExecutionContext, Future}
@jducoeur
jducoeur / Filter.js
Created Jul 17, 2017
Filter code for IFTTT script to translate Dreamwidth RSS to Facebook
View Filter.js
var initialHtml = Feed.newFeedItem.EntryContent;
var crlf = "<br>&nbsp;<br>";
var crlf2 = "<br>&nbsp;<br>&nbsp;<br>";
// These are the RegExp+replacement transformations we are going to do on the HTML:
var transforms = [
// A DW userhead:
["<span style='white-space: nowrap;'><a href='(?:.*?)'><img src='(?:.*?)' alt='(?:.*?)' width='17' height='17' style='(?:.*?)' /></a><a href='https://(?:.*?).dreamwidth.org/'><b>(.*?)</b></a></span>", "@$1"],
["<p>(.*?)</p>", '$1' + crlf],
['<a href="(.*?)">(.*?)</a>', "$2 ($1)"],
@jducoeur
jducoeur / slick-shutdown-error
Created Jun 30, 2017
An error I am getting when trying to do db.run()
View slick-shutdown-error
I'm getting the following error when trying to do db.run() on a `+=` insert in Slick.
This is happening under play-slick.
It is the first database action, so something could be wrong with the connection, *but* play-slick-evolutions is working just fine. So I have reason to believe the credentials are right.
```
----> About to do Vector(insert into "email" ("logtime","reqtype","successful","dtlenderid","dtdealerid","dtappid","lenderdealerid","request","transrequest","response","transresponse","errors") values (?,?,?,?,?,?,?,?,?,?,?,?))
----> db.run got error java.lang.IllegalStateException: Cannot initialize ExecutionContext; AsyncExecutor already shut down
play.api.libs.Files$DefaultTemporaryFileCreator - deletePath: deleting = /tmp/playtemp8413301446117630367
@jducoeur
jducoeur / dw-to-fb.js
Last active Apr 14, 2017
Zapier JavaScript code for parsing Dreamwidth RSS into Facebook-friendly form
View dw-to-fb.js
var initialHtml = inputData.postHtml;
// These are the RegExp+replacement transformations we are going to do on the HTML:
var transforms = [
// A DW userhead:
["<span style='white-space: nowrap;'><a href='(?:.*?)'><img src='(?:.*?)' alt='(?:.*?)' width='17' height='17' style='(?:.*?)' /></a><a href='https://(?:.*?).dreamwidth.org/'><b>(.*?)</b></a></span>", "@$1"],
["<p>(.*?)</p>", "$1"],
['<a href="(.*?)">(.*?)</a>', "$2 ($1)"],
['<em>(.*?)</em>', "*$1*"],
['<strong>(.*?)</strong>', "**$1**"],
View gist:5e99bbd06f16297e205112c261604e89
sealed trait MyTrait
case class Impl1() extends MyTrait
case class Impl2() extends MyTrait
def recover1:PartialFunction[Any, Unit] = {
case s:String => println("It was a String")
case i:Int => println("It was an Int")
}
def recoverMyTrait:PartialFunction[MyTrait, Unit] = {
View gist:d6000b866599c5ee95f1
[info] Compiling 40 Scala sources to /home/jducoeur/GitHub/Querki/querki/scala/jvm/target/scala-2.11/classes...
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:5: object MainDecorator is not a member of package querki.qtext
[error] import querki.qtext.{MainDecorator, Transformer}
[error] ^
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:6: object html is not a member of package querki
[error] import querki.html.Html
[error] ^
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:10: object fleem is not a member of package querki
[error] import querki.fleem
[error] ^
View gist:4330d02961b333a70e72
jducoeur@querki-dev2:~/GitHub/Querki/querki/scala$ ls -R js
js:
src target
js/src:
main
js/src/main:
scala
View gist:004e0758b9df7b7cdccb
jducoeur@querki-dev2:~/GitHub/Querki/querki/scala$ ls -R jvm
jvm:
src target
jvm/src:
main
jvm/src/main:
scala
View gist:486fa8b37fbc8c7c1a01
import sbt.Project.projectToRef
lazy val clients = Seq(querkiClient)
lazy val scalaV = "2.11.6"
lazy val akkaV = "2.3.11"
lazy val appV = "1.2.1"
lazy val sharedSrcDir = "scala"
You can’t perform that action at this time.