I hereby claim:
- I am dahernan on github.
- I am dahernan (https://keybase.io/dahernan) on keybase.
- I have a public key whose fingerprint is DF74 80B5 424D 0DDD 96AA 9E4E 0E34 CAA0 068D E384
To claim this, I am signing this object:
/* | |
Script to increase the version number of the project and remove snapshots | |
Using Gmaven: http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code | |
Execute standalone | |
$ mvn groovy:execute | |
<plugin> | |
<groupId>org.codehaus.gmaven</groupId> |
Bash funtions | |
function psgrep() { ps aux | grep -v grep | grep "$@" -i --color=auto; } | |
function fname() { find . -iname "*$@*"; } | |
Who is using the port 25 | |
$ lsof -i :25 | |
Ports that process is using | |
$ lsof -p 52808|grep TCP |
$ redis-cli set sequence 1 | |
$ redis-cli set node_id 1 | |
-- id.lua | |
local epoch = 1288834974657 | |
local seq = tonumber(redis.call('INCR', 'sequence')) % 4096 | |
local node = tonumber(redis.call('GET', 'node_id')) % 1024 | |
local time = redis.call('TIME') | |
local time41 = ((tonumber(time[1]) * 1000) + (tonumber(time[2]) / 1000)) - epoch | |
return (time41 * (2 ^ 22)) + (node * (2 ^ 12)) + seq |
// needs node.js | |
// npm socket.io | |
// npm amqp | |
// rabbitmq running at localhost | |
var http = require('http'), | |
url = require('url'), | |
fs = require('fs'), | |
io = require('socket.io'), | |
amqp = require('amqp'), |
To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux: | |
1 Open a command prompt or terminal. | |
2 Run this command: | |
keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048 | |
Where <days> indicate the number of days for which the certificate will be valid. | |
3 Enter a password for the keystore. Note this password as you require this for configuring the server. |
I hereby claim:
To claim this, I am signing this object:
$ docker run -d elasticsearch | |
$ docker ps | |
ID IMAGE COMMAND CREATED STATUS PORTS | |
29fd16250848 elasticsearch:latest /bin/sh -c elasticse 32 seconds ago Up 32 seconds 9200->9200 |
$ docker images | |
REPOSITORY TAG ID CREATED SIZE | |
ubuntu 12.04 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB) | |
ubuntu 12.10 b750fe79269d 4 months ago 24.65 kB (virtual 180.1 MB) | |
ubuntu latest 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB) | |
ubuntu precise 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB) | |
ubuntu quantal b750fe79269d 4 months ago 24.65 kB (virtual 180.1 MB) | |
elasticsearch latest ef2487bb289d 52 seconds ago 12.29 kB (virtual 558.7 MB) |
FROM ubuntu | |
MAINTAINER dahernan "dahernan@gmail.com" | |
# Java 7 | |
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
RUN apt-get update | |
RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
RUN apt-get install oracle-java7-installer -y |