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
// This package shows a non-concurrent safe way to initialize and | |
// share a package scoped variable. | |
package example | |
// package scoped variable initialized in GetClient(). | |
// its type is not important | |
var pkgScopedVar []byte | |
// Client is used for its methods |
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
foo bar |
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
Jeremys-MBP:~ jeremy$ sudo /usr/local/sbin/mtr -r -w nimitz.jeremychase.net | |
Start: Sun Oct 18 11:56:31 2015 | |
HOST: Jeremys-MBP Loss% Snt Last Avg Best Wrst StDev | |
1.|-- dslrouter 0.0% 10 1.7 1.8 1.0 3.7 0.7 | |
2.|-- 32.216.159.254 50.0% 10 98.9 85.2 61.2 111.5 21.4 | |
3.|-- 32.223.104.93 90.0% 10 111.0 111.0 111.0 111.0 0.0 | |
4.|-- ae5---0.car01.wlfr.ct.frontiernet.net 90.0% 10 112.9 112.9 112.9 112.9 0.0 | |
5.|-- ae1---0.car02.wlfr.ct.frontiernet.net 90.0% 10 125.4 125.4 125.4 125.4 0.0 | |
6.|-- ae11---0.cor01.asbn.va.frontiernet.net 90.0% 10 125.6 125.6 125.6 125.6 0.0 | |
7.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 |
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
java.lang.RuntimeException: Unable to find proto buffer class | |
at com.google.protobuf.GeneratedMessageLite$SerializedForm.readResolve(GeneratedMessageLite.java:709) ~[protobuf-java-2.4.1.jar:na] | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_40] | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_40] | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40] | |
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40] | |
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1104) ~[na:1.7.0_40] | |
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1805) ~[na:1.7.0_40] | |
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) ~[na:1.7.0_40] | |
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) ~[na:1.7.0_40] |
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
- get_url: url=http://downloads.typesafe.com/play/{{ item.version }}/play-{{ item.version }}.zip dest={{ play_dl_dir }} sha256sum={{ item.sum }} | |
with_items: | |
- { "version":2.2.1, "sum":a4a453cdd5f36d608eddeceaa04f7b8117e8883a89f308eb34a7f740cb8bf78b } |
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
# check-war.yml has several actions, so I don't want duplicated with_items on each | |
- include: check-war.yml target={{item.name}} buildnumber={{item.buildnumber}} | |
with_items: | |
- { "name":foo, "buildnumber":$foo_buildnumber } | |
- { "name":bar, "buildnumber":$bar_buildnumber } | |
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
JAVA_OPTS="" | |
JAVA_OPTS="${JAVA_OPTS} -Xms3G" | |
JAVA_OPTS="${JAVA_OPTS} -Xmx3G" | |
JAVA_OPTS="${JAVA_OPTS} -Xmn1g" | |
JAVA_OPTS="${JAVA_OPTS} -XX:ReservedCodeCacheSize=512M" | |
export JAVA_OPTS |
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
// TODO this should done as an unmanaged something like this http://www.scala-sbt.org/release/docs/Howto/generatefiles.html | |
compileAvroSchemas := { | |
Seq("bash", "-c", "java -jar " + Path.userHome.absolutePath + "/.ivy2/cache/org.apache.avro/avro-tools/jars/avro-tools-" + avroVersion + ".jar compile schema example/src/main/config/schemas/* example/src/main/java") ! | |
} | |
// TODO This is far from ideal and should use the sbt managedSources | |
lazy val myClean = taskKey[Unit]("Clean generated files") | |
myClean := { | |
Seq("bash", "-c", "rm example/src/main/java/example.com/serialization/generated/*") ! |
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
javascript:$('.ratio-info').remove(); | |
$('#clickers .s_div, #sellers .s_div').each( | |
function(index, div) { | |
var divname = $(div).attr('id'); | |
var rawCost = $('#' + divname + '_cst').text(); | |
var rawRps = $('#' + divname + '_rps').text(); | |
var costMulti = 1; | |
var rpsMulti = 1; |
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
example-name ansible_ssh_host=10.0.1.14 | |
[foo-servers] | |
example-name |
NewerOlder