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
var ww = new WebWorker(); |
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
def logcall(f): | |
def wrapper(*a, **opts): | |
print('calling ' + f.__name__) | |
f(*a, **opts) | |
print('called ' + f.__name__) | |
return wrapper | |
@logcall | |
def square(x): |
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
public static WebSocket<String> pingWs() { | |
return new WebSocket<String>() { | |
@Override | |
public void onReady(In<String> in, Out<String> out) { | |
in.onMessage(new F.Callback<String>() { | |
@Override | |
public void invoke(String s) throws Throwable { | |
System.out.println(s); | |
} |
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
/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 12.app/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 12.app/lib/idea_rt.jar:/Applications/IntelliJ IDEA 12.app/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Conte |
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
ResteasyClient client = new ResteasyClientBuilder().build(); | |
ResteasyWebTarget target = client.target(serviceRootUrl); | |
target = target.path("places") | |
.queryParam("client_id", authKey) | |
.queryParam("search[query]", cityName) | |
.queryParam("search[start_date]", fromDate) | |
.queryParam("search[end_date]", toDate) | |
.queryParam("search[price_min]", priceMin) | |
.queryParam("search[price_max]", priceMax) | |
.queryParam("search[number_of_beds]", numberOfGuests) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
{ | |
ok: true, | |
status: 200, | |
name: "Evilhawk", | |
version: { | |
number: "0.90.10", | |
build_hash: "0a5781f44876e8d1c30b6360628d59cb2a7a2bbb", | |
build_timestamp: "2014-01-10T10:18:37Z", | |
build_snapshot: false, | |
lucene_version: "4.6" |
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
lsof -i4 | grep -i ipv4 | grep -o -- '->.*' | sort | uniq -c | sort -g |
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/spark-submit --class de.veliqi.scala.logprocessor.App --deploy-mode client --master spark://Behars-MacBook-Pro.local:7077 ~/Documents/workspace/logprocessor/target/logprocessor-0.0.1-SNAPSHOT-jar-with-dependencies.jar | |
log4j:WARN No appenders could be found for logger (kafka.utils.VerifiableProperties). | |
log4j:WARN Please initialize the log4j system properly. | |
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. | |
Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.ArrowAssoc(Ljava/lang/Object;)Ljava/lang/Object; | |
at kafka.producer.ProducerStats.<init>(ProducerStats.scala:24) | |
at kafka.producer.ProducerStatsRegistry$$anonfun$1.apply(ProducerStats.scala:34) | |
at kafka.producer.ProducerStatsRegistry$$anonfun$1.apply(ProducerStats.scala:34) | |
at kafka.utils.Pool.getAndMaybePut(Pool.scala:61) | |
at kafka.producer.ProducerStatsRegistry$.getProducerStats(ProducerStats.scala:38) |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>de.veliqi.scala</groupId> | |
<artifactId>logprocessor</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>${project.artifactId}</name> | |
<description>My wonderfull scala app</description> | |
<inceptionYear>2015</inceptionYear> | |
<licenses> | |
<license> |
OlderNewer