Skip to content

Instantly share code, notes, and snippets.

@fdussert
fdussert / .gitconfig
Created November 26, 2012 21:57
Git alias that set upstream of the current branch to origin
...
[alias]
...
up = !sh -c 'export bn=`git rev-parse --abbrev-ref HEAD` && git branch --set-upstream $bn origin/$bn' -
...
.check(status.is(200),
header("Set-cookie").
transform((s: String) => "Segments match").
is((s:Session) => {
var cookVal = "";
for (cookie <- CookieHandling.getStoredCookies(s, urlBase)){
println(cookie.getName()+" -> "+cookie.getValue())
if(cookie.getName() == "aisakosSegs")
cookVal = cookie.getValue();
}
@fdussert
fdussert / Hyperdex
Created August 2, 2012 14:34
How to compile Hyperdex on debian with Java and YCSB bindings
Edit /etc/apt/sources.list
Add deb http://backports.debian.org/debian-backports squeeze-backports main
wget -O - http://debian.hyperdex.org/hyperdex.gpg.key \
| apt-key add -
wget -O /etc/apt/sources.list.d/hyperdex.list \
http://debian.hyperdex.org/hyperdex.list
@fdussert
fdussert / graphite-centos6-install.txt
Created April 6, 2012 18:18 — forked from dillera/graphite-centos6-install.txt
Install Graphite 0.9.9 and Statsd on Centos 6
# FOR CENTOS 6
# Andrew Diller Jan 2012
# Get EPEL Repo installed
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
vi /etc/yum.repos.d/epel.repo
Errno::ECONNRESET (Connection reset by peer):
/usr/lib/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock'
/usr/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
/usr/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
/usr/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
/usr/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
/usr/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
/usr/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
62 CLOSE_WAIT
16 CLOSING
1 established)
1475 ESTABLISHED
41 FIN_WAIT1
31 FIN_WAIT2
1 Foreign
20 LAST_ACK
10 LISTEN
134 SYN_RECV
/**
* Web root
*/
@Stateless
@Path("/")
public class Marker {
//webmethods ...
/**
* Web root
*/
@Stateless
@Path("/")
public class Marker {
private static final Logger logger = Logger.getLogger("com.ezakus.api.marker");
@Inject
DependencyResolvers
.use(MavenDependencyResolver.class)
.loadEffectivePom("pom.xml")
.up()
.artifact("com.ezakus.api:hit:jar:1.0.5")
.artifact("com.ezakus.core:cookie:jar:0.0.1-SNAPSHOT")
.resolveAs(GenericArchive.class))
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.0.0.CR7</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>