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
import java.io.File | |
import akka.actor._ | |
import akka.routing.{Routee, RemoveRoutee, ActorRefRoutee, AddRoutee} | |
import akka.stream.actor.ActorPublisher | |
import org.akkamon.core.ActorStack | |
import org.akkamon.core.instruments.CounterTrait | |
import play.api.libs.json.Json | |
import scala.annotation.tailrec | |
import scala.concurrent.duration._ |
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
import org.junit.Before | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.springframework.http.MediaType | |
import org.springframework.test.context.ContextConfiguration | |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner | |
import org.springframework.test.context.web.WebAppConfiguration | |
import org.springframework.test.web.servlet.MockMvc | |
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders | |
import org.springframework.test.web.servlet.setup.MockMvcBuilders |
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
import org.springframework.http.MediaType | |
import org.springframework.web.bind.annotation.* | |
@RestController | |
public class PlayerController { | |
@RequestMapping(value = "/authenticate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_XML_VALUE) | |
public @ResponseBody PlayerAuthenticationResponse authenticate(@RequestBody final PlayerAuthentication request) { | |
return new PlayerAuthenticationResponse() | |
} |
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
version: '2' | |
services: | |
mysql: | |
image: mysql:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: demop@ssword | |
volumes: | |
- /home/finnplay/docker/var/lib/mysql:/var/lib/mysql | |
labels: | |
o.rancher.scheduler.global: 'true' |
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
version: '2' | |
services: | |
registry: | |
image: registry:2 | |
environment: | |
REGISTRY_AUTH: htpasswd | |
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd | |
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm | |
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt | |
REGISTRY_HTTP_TLS_KEY: /certs/domain.key |
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
version: '2' | |
services: | |
activemq: | |
image: rmohr/activemq:5.10.0 | |
volumes: | |
- /home/hanrenwei/Docker/activemq/conf/activemq.xml:/opt/activemq/conf/activemq.xml | |
- /home/hanrenwei/Docker/activemq/conf/groups.properties:/opt/activemq/conf/groups.properties | |
- /home/hanrenwei/Docker/activemq/conf/jetty-realm.properties:/opt/activemq/conf/jetty-realm.properties | |
- /home/hanrenwei/Docker/activemq/conf/users.properties:/opt/activemq/conf/users.properties | |
- /home/hanrenwei/Docker/activemq/data:/var/activemq/data |
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
1. Setup a project | |
2. Add groovy SDK support: | |
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA | |
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl | |
- this will give you the .gdsl file - download this to the src folder of your project. | |
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root |
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
# How to install `ipkg` on a Synology DS214 | |
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) for the DS214 too. | |
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you. | |
## Guide | |
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
Graph of total commits by month, over last year: | |
hg churn -f "%Y-%m" -s -c -d "-365" | |
List of my commits over last year: | |
hg log -k aras -d "2013-01-01 to 2013-12-31" --template "{short(node)} {user(author)} {firstline(desc)}\n" >mycommits.txt | |
My lines changed count over last year (takes ages): |
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
@Bean | |
public KStream<String, Event> kStreamJson(StreamsBuilder builder) { | |
KStream<String, Event> stream = | |
builder.stream(topic, Consumed.with(Serdes.String(), new JsonSerde<>(Event.class))); | |
stream | |
.map(((key, value) -> KeyValue.pair(LocalDate.now().toString(), 1L))) | |
.filter( | |
(key, msg) -> { | |
System.out.println("Got a message! key = {}, value = {}" + key + " " + msg); |