View ContentType.scala
1 2 3 4 5 6 7 8 9 10
package eu.inn.forgame.api.rest
 
import spray.routing.Route
 
import eu.inn.util.akka.ActorSystemComponent
import eu.inn.util.http.RestServiceComponent
import eu.inn.util.servicebus.ServiceBusComponent
 
import eu.inn.datamodel.forgame.auth.IssueToken
import eu.inn.forgame.api.directives.{AuthProviderComponent, AuthUser}
View FlagsRegistry.scala
1 2 3 4 5 6 7 8 9
object FlagsRegistry {
 
private val flagsRegistry = new FlagsRegistry(config, dao, executorService)
 
def check(serviceId: Long, flag: FlagEnum) = flagsRegistry.check(serviceId, flag)
}
 
 
class FlagsRegistry(conf, dao, executorService) {
View spray-nginx.conf
1 2 3 4 5 6 7 8 9 10
server {
listen 80;
server_name localhost;
 
location / {
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
View AkkaReceiveAndReply.scala
1 2 3 4 5 6 7 8 9
package eu.inn.util.akka
 
import concurrent.Future
import concurrent.duration._
import scala.reflect.ClassTag
import util.control.NonFatal
 
import akka.actor._
import akka.util.Timeout
View 0_reuse_code.js
1 2
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View kibana-color-level.patch
1 2 3 4 5 6 7 8 9 10
diff --git a/src/app/panels/table/module.html b/src/app/panels/table/module.html
index b1aa49f..515ba06 100644
--- a/src/app/panels/table/module.html
+++ b/src/app/panels/table/module.html
@@ -52,6 +52,24 @@
padding: 10px;
border: 1px solid #666;
}
+ .table-field-level-error {
+ border-radius: 3px;
View example.py
1 2 3
l = ["1", "32", "hello", "3", "my 43"]
 
return [int(_) for _ in filter(lambda _: _.isdigit(), l)]
View es-scroll.scala
1 2 3 4 5 6 7 8 9 10
val timeout = new TimeValue(600000)
 
val requestBuilder = client
.prepareSearch(index)
.setTypes(indexType)
.setSize(size.getOrElse(5000))
.setScroll(timeout)
.setSearchType(SearchType.SCAN)
 
query foreach requestBuilder.setQuery
View jackson.scala
1 2 3 4 5 6 7 8 9
package com.digsolab.euler.util.format
 
import org.scalatest.FlatSpec
import org.scalatest.matchers.MustMatchers
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonInclude.Include
 
 
case class Person(name: String, age: Int)
View .zshrc
1 2 3 4 5 6 7 8 9
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
 
plugins=(osx brew git sbt bower)
 
source $ZSH/oh-my-zsh.sh
 
 
PROMPT='%{$fg[yellow]%}➤%{$fg_bold[green]%}%p %{$fg[cyan]%}%c $ % %{$reset_color%}'
Something went wrong with that request. Please try again.