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
/** | |
* A first name. | |
* <p> | |
* In other programming languages, you would be able to write something like | |
* <code> | |
* typedef FirstName String; | |
* </code> | |
*/ | |
public class FirstName { | |
private String firstName; |
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
description "my application" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 360 180 | |
setuid myuser | |
setgid mygroup | |
chdir /my/directory | |
exec /bin/sleep 60 |
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
description "my application" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 360 180 | |
setuid myuser | |
setgid mygroup | |
script | |
chdir /my/directory | |
exec java -jar /srv/my.jar |
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 class NullcheckAbstractionsExamples { | |
public void Example1( ) { | |
NullablePair pair; | |
pair = Nullables.pair(myObject1.getProperty(), myObject2.getProperty()); | |
if (pair.anyNull()) | |
return pair.compare(); | |
pair = Nullables.pair(myObject1.getProperty().getSubProperty(), myObject2.getProperty().getSubProperty()); | |
if (pair.anyNull()) |
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
root@precise64:/etc/apt/sources.list.d# curl -L https://debian.datastax.com/debian/repo_key | sudo apt-key add - | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: | |
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed | |
More details here: http://curl.haxx.se/docs/sslcerts.html | |
curl performs SSL certificate verification by default, using a "bundle" | |
of Certificate Authority (CA) public keys (CA certs). If the default | |
bundle file isn't adequate, you can specify an alternate file |
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
cqlsh:tink> CREATE TABLE a(a uuid, b timeuuid, c uuid, PRIMARY KEY (a,b)); | |
cqlsh:tink> INSERT INTO a(a,b,c) VALUES (48ecda32-b32a-43ae-bd30-ecf4819fb83c, 468ee710-1bd2-11e4-b2a2-0179c71c52ea, 73e54e00-ad66-4f88-8dd8-92bc1c648e9d); | |
cqlsh:tink> INSERT INTO a(a,b,c) VALUES (48ecda32-b32a-43ae-bd30-ecf4819fb83c, 468ee711-1bd2-11e4-b2a2-0179c71c52ea, 2fdb7e7a-cf9d-43a4-aa86-7820336fc363); | |
cqlsh:tink> INSERT INTO a(a,b,c) VALUES (48ecda32-b32a-43ae-bd30-ecf4819fb83c, 468ee712-1bd2-11e4-b2a2-0179c71c52ea, 18551ae7-b117-4b41-b5fa-fd233e2425dd); | |
cqlsh:tink> SELECT * FROM a; | |
a | b | c | |
--------------------------------------+--------------------------------------+-------------------------------------- | |
48ecda32-b32a-43ae-bd30-ecf4819fb83c | 468ee710-1bd2-11e4-b2a2-0179c71c52ea | 73e54e00-ad66-4f88-8dd8-92bc1c648e9d | |
48ecda32-b32a-43ae-bd30-ecf4819fb83c | 468ee711-1bd2-11e4-b2a2-0179c71c52ea | 2fdb7e7a-cf9d-43a4-aa86-7820336fc363 |
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.project.common.config; | |
t | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicReference; | |
import org.springframework.cassandra.core.keyspace.CreateKeyspaceSpecification; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.data.cassandra.config.CassandraClusterFactoryBean; | |
import org.springframework.data.cassandra.config.CassandraSessionFactoryBean; |
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
--withborder | |
--author Jens Rantil, Tink AB | |
--title Intrusion | |
--date 2014-10-06 | |
--center If a bad day strikes you. | |
--newpage goal | |
--heading Agenda |
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
ERROR [Monitor for Jetty bugs] 2014-11-03 11:45:16,269 JettyBugMonitor.java (line 108) Jetty bug monitor failed | |
java.lang.NullPointerException | |
at org.apache.hadoop.mapred.JettyBugMonitor.isJettySelectorThread(JettyBugMonitor.java:218) | |
at org.apache.hadoop.mapred.JettyBugMonitor.getJettyThreadIds(JettyBugMonitor.java:205) | |
at org.apache.hadoop.mapred.JettyBugMonitor.waitForJettyThreads(JettyBugMonitor.java:182) | |
at org.apache.hadoop.mapred.JettyBugMonitor.doRun(JettyBugMonitor.java:114) | |
at org.apache.hadoop.mapred.JettyBugMonitor.run(JettyBugMonitor.java:102) |
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 pylab as p | |
import subprocess | |
import argparse | |
from collections import Counter | |
import numpy as np | |
import itertools | |
# See http://jensrantil.github.io/line-styles-in-matplotlib.html. | |
icolors = itertools.cycle('bgrcmykw') |
OlderNewer