Wednesday, January 06, 2016

MacOSX Sed: extra characters at the end of

if your sed is throwing something like extra characters at the end of p command


then do

sed -i '' 'regex' filename

Remember  to add the '' before regex.

Wednesday, August 19, 2015

Tip: Elasticsearch OSX ConnectException

If you downloaded the latest Elasticsearch installation and you are getting the following exception:

org.elasticsearch.common.netty.channel.ConnectTimeoutException: connection timed out:/xyz.def.zzzz:9300
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:139)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)



Solution

go to config/elasticsearch.yml

Uncomment the following line
discovery.zen.ping.multicast.enabled: false

Restart Elasticsearch

Tuesday, July 14, 2015

Git Tip: Repository not found

If you get any of the following errors:
GitLab: The project you were looking for could not be found.
Git The Repository not found
Please make sure you have the correct access rights

and the repository exists.

when you do operations such as git clone or git push,
it is possible that your ssh key has not been added with ssh-agent

$ ssh-add
Enter passphrase for /home/name/.ssh/id_rsa: [] Identity added: /home/name/.ssh/id_rsa 

After this, it should hopefully work