My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
package com.jivimberg.sqs.published | |
import kotlinx.coroutines.CancellationException | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.isActive | |
import kotlinx.coroutines.yield | |
import java.lang.Thread.currentThread | |
suspend fun CoroutineScope.repeatUntilCancelled(block: suspend () -> Unit) { | |
while (isActive) { |
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
@FunctionalInterface | |
public interface PipelineStep<I, O, Ctx> { | |
static <I, O, Ctx> PipelineStep<I, O, Ctx> of(PipelineStep<I, O, Ctx> source) { | |
return source; | |
} | |
O execute(I value, Ctx context) throws Exception; | |
default <R> PipelineStep<I, R, Ctx> pipe(PipelineStep<O, R, Ctx> next) { |
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
/** | |
Main start | |
*/ | |
package com.cengenes; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.web.bind.annotation.RestController; |
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 play.db.jpa.JPA; | |
public class FirstDao { | |
public int dbCall() { | |
return JPA.em() | |
.createNativeQuery("DELETE FROM table WHERE id=1") | |
.executeUpdate(); | |
} |
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
😄