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
#### Create a feature branch | |
git checkout -b <branch-name> | |
#### Create a remote branch for the feature branch | |
git push origin refs/heads/<branch-name> | |
#### Delete a remote branch | |
git push origin :refs/heads/<branch-name> |
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 dispatch._ | |
import Http._ | |
val https = new Http with HttpsLeniency | |
val secureHost = (:/("localhost", 443)).secure | |
val resp = https(secureHost / "search" as_str) |
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 dispatch._ | |
import Http._ | |
val http = new Http with thread.Safety with NoLogging | |
val host = :/("localhost", 8080) | |
//GET | |
val resp = http(host / "feed-api" / "app1" / "status" as_str) |
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
#!/bin/sh | |
kill $(lsof -t -i :8080) |
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
#Http Caching | |
trait HttpCache extends Http { | |
override def make_client: org.apache.http.client.HttpClient = { | |
val config = new CacheConfig | |
config.setMaxCacheEntries(500) | |
config.setMaxObjectSizeBytes(50000) | |
new CachingHttpClient(super.make_client, config) | |
} | |
} |
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
fhb -J -server -J -Xmx512m -J -Xms512m -c 1 -D test-results -s -S -W 20000 -r360/720/360 -p data.json http://localhost:8080/xyz-service |
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
# Lift Run modes | |
"test", "staging", "production", "pilot", "profile", or blank | |
-Drun.mode=production | |
# Snippets | |
snippets are in the xxx.snippet package or LiftRules.addToPackages("xyz") |
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
-server -Xms2048m -Xmx2048m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods |
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
# Compiler switches for optimization | |
-optimise | |
# Detailed Scala Collection Doc | |
http://www.scala-lang.org/docu/files/collections-api/collections.html | |
# @specialized (full performance for generic code) | |
# Scala Performance Optimization |
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
private boolean scheduleWriteIfNecessary(final SctpChannelImpl channel) { | |
final Thread currentThread = Thread.currentThread(); | |
final Thread workerThread = thread; | |
if (currentThread != workerThread) { | |
if (channel.writeTaskInTaskQueue.compareAndSet(false, true)) { | |
boolean offered = writeTaskQueue.offer(channel.writeTask); | |
assert offered; | |
} | |
if (!(channel instanceof SctpAcceptedChannel) || |
OlderNewer