Skip to content

Instantly share code, notes, and snippets.

View zv3's full-sized avatar

Diego Zacarías V. zv3

  • void0
  • Asunción, PY
  • 15:50 (UTC -04:00)
View GitHub Profile
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false,
"env": {
"test": {
"plugins": [ "istanbul" ]
}
}
}
package repositories
import javax.inject.{Singleton, Inject}
import com.os.shared.contentapi.api._
import com.os.shared.contentapi._
import com.sksamuel.elastic4s.ElasticDsl._
import com.sksamuel.elastic4s.QueryDefinition
import common.Logging
import implicits.ESFormats
@zv3
zv3 / app.jsx
Last active October 4, 2016 09:35
Example of a React app + react-intl library along with an external json-formatted messages file and it's spanish translated version. Live demo: https://embed.plnkr.co/xm0iHI/
const { IntlProvider, FormattedMessage, addLocaleData } = ReactIntl;
// Import your json file containing the default messages
import defaultMessages from './defaultMessages.json!json';
// Import your json file containing the translated messages,
// in this example we are importing the spanish version of our messages.
import spanishMessages from './en_ES.json!json';
const { es } = ReactIntlLocaleData;
@zv3
zv3 / Select.scala
Last active December 22, 2018 23:00
A lightweight port of Jedwatson's react-select written in Scala using jagpolly's scalajs-react wrapper library.
package client.components.select
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.{LogLifecycle, Reusability, Px}
import japgolly.scalajs.react.vdom.prefix_<^._
import org.scalajs.dom
import org.scalajs.dom.ext.KeyCode
import org.scalajs.dom.raw.HTMLInputElement
object Select {
@zv3
zv3 / GoogleTag.scala
Created May 18, 2016 21:51
Google Publisher Tag (DFP) Scala.js façade
package client.facades
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
import scala.scalajs.js.|
/*
Don't forget to include the GPT JS script fetching code (sync or async) at the head HTML tag!
*/
www.operationsports.com:
standard:
preroll: "http://ads.intergi.com/adrawdata/3.0/5205/3599441/0/1013/ADTECH;cors=yes;width=__WIDTH__;height=__HEIGHT__;referring_url=__WEB_URL__;content_url=__CONTENT_URL__;media_id=__MEDIA_ID__;title=__TITLE__;device=__DEVICE__;model=__MODEL__;os=__OS__;osversion=__OSVERSION__;ua=__UA__;ip=__IP__;uniqueid:__UNIQUEID__;tags=__TAGS__;number=__RANDOM__;time=__TIME__"
midroll: "http://ads.intergi.com/adrawdata/3.0/5205/3599442/0/1013/ADTECH;cors=yes;width=__WIDTH__;height=__HEIGHT__;referring_url=__WEB_URL__;content_url=__CONTENT_URL__;media_id=__MEDIA_ID__;title=__TITLE__;device=__DEVICE__;model=__MODEL__;os=__OS__;osversion=__OSVERSION__;ua=__UA__;ip=__IP__;uniqueid:__UNIQUEID__;tags=__TAGS__;number=__RANDOM__;time=__TIME__"
video300x250: "http://ads.intergi.com/addyn/3.0/5205/3599445/0/170/ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[123];misc="
overlay: "http://ads.intergi.com/adrawdata/3.0/5205/3696481/0/6744/ADTECH;cors=yes;width=__WIDTH__;hei
// controllers/Application.scala
object Application extends Controller {
def index = ActionWithAttrs { implicit request =>
Ok(views.html.index())
}
}
object ActionWithAttrs extends StackableAction