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
apiVersion: v1 | |
kind: BuildConfig | |
metadata: | |
name: pv-checker | |
spec: | |
runPolicy: Serial | |
source: | |
git: | |
ref: master | |
uri: https://github.com/rawlingsj/pv-checker.git |
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
# put this in your .bash_profile to set the title to be the working directory | |
export PROMPT_COMMAND='' | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run |
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
from( "direct:test-no-ep" ).to( "drools://node/ksession1?action=insertBody" ); | |
from( "direct:test-with-ep" ).to( "drools://node/ksession1?action=insertBody&entryPoint=ep1" ); | |
from( "direct:test-message" ).to( "drools://node/ksession1?action=insertMessage" ); | |
from( "direct:test-exchange" ).to( "drools://node/ksession1?action=insertExchange" ); |
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
// Clearly this won't actually work since obs2 would need to be final but then you can't assign it inside the handler | |
MyEventBus eb = new MyEventBus(); | |
Observable obs1 = eb.send("foo", "msg1"); | |
Observable obs2 = obs1.mapMany(new Func1<String, String>() { | |
@Override | |
public void call(String str) { | |
System.out.println("Got result: " + str); |
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
Tuple3 { | |
inline def forEach(fn: Function<Any?,Unit>):Unit = { | |
fn.invoke(this._1) | |
fn.invoke(this._2) | |
fn.invoke(this._3) | |
} | |
} |
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
kotlin code: | |
val builder = HtmlBuilder(usersLocale).useLongDates() | |
"foo $a bar $b".build(builder) | |
Creates a function | |
fun template1(out: HtmlBuilder, a: String, b: Foo): Unit { | |
out.append("foo ") | |
out.append(a) | |
out.append(" bar ") |
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
# | |
val name = "Foo" | |
val blah = "Something" | |
class #{name} extends #{interfaces.mkString(" with ")} | |
# for( method <- methods ) | |
def #{method.name}() = | |
println | |
:string | |
Here | |
Doc style |
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
new $ { | |
// replace contents | |
$("table.people").contents { | |
for (p <- people) { | |
$("td.name") = p.name | |
$("td.address") = p.customer.address | |
} | |
// replace entire stuff | |
$("foo") { |
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
val xml = | |
<table class="people"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Location</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> |
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
object transformer extends Transformer { | |
$(".people") { node => | |
val odd = node.$("tr.odd") | |
val even = node.$("tr.even") | |
var c=0 | |
people.flatMap { p => | |
c += 1 | |
transform(if (c%2 == 0) even else odd) { t => | |
$(".name").contents = p.name | |
$(".location").contents = p.location |
NewerOlder