<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1436098877388372574</id><updated>2024-09-19T17:59:52.070+00:00</updated><category term="java"/><category term="Scala"/><category term="android"/><category term="swing"/><category term="javafx"/><category term="Bitcoin"/><category term="graph"/><category term="C#"/><category term="Golf"/><category term="Ubuntu"/><category term="closures"/><category term="crypto"/><category term="ethereum"/><category term="euro"/><category term="finance"/><category term="football"/><category term="France"/><category term="Java 8"/><category term="Scalatra"/><category term="etrading"/><category term="mac os x"/><category term="rsa"/><category term="Coursera"/><category term="FIX"/><category term="FIXML"/><category term="Genetic Algorithm"/><category term="Kohonen"/><category term="Quants"/><category term="Rugby"/><category term="SOM"/><category term="a380"/><category term="air france"/><category term="apple"/><category term="crisis"/><category term="debt"/><category term="london"/><category term="oil"/><category term="security"/><category term="violin"/><category term="$"/><category term="..."/><category term=".net"/><category term="2D Grid"/><category term="AES"/><category term="Arc de Triomphe"/><category term="BIP32"/><category term="BTC"/><category term="Babyloan"/><category term="Blockchain"/><category term="Brent"/><category term="C++"/><category term="CEP"/><category term="Cake"/><category term="Chelsea Pier"/><category term="Christmas"/><category term="Chrome Web Store"/><category term="Crossword"/><category term="Cryptography"/><category term="DECODE"/><category term="DECODER"/><category term="DEX"/><category term="Digital Banking"/><category term="Digital Signature"/><category term="Docking"/><category term="ETH"/><category term="Eiffel Tower"/><category term="Embarrassingly parallel"/><category term="Esper"/><category term="Fin des Banques"/><category term="Gateau Polonais aux pommes"/><category term="Google Drive"/><category term="Google cloud SDK"/><category term="Google plus"/><category term="Gosling"/><category term="Gource"/><category term="Group By"/><category term="Gui Builder"/><category term="HEDERA"/><category term="HMAC"/><category term="HTTPClient"/><category term="Hadoop"/><category term="IT Security"/><category term="JDK 10"/><category term="JEE 6"/><category term="JMS"/><category term="JOGL"/><category term="Java Native Interface"/><category term="Jobs"/><category term="KCD"/><category term="Kotlin"/><category term="Lambdas"/><category term="Linux"/><category term="Livre"/><category term="Lodestone"/><category term="MD5"/><category term="Machine Learning"/><category term="Man On Wire"/><category term="Mandarin"/><category term="Mandelbrot"/><category term="Micro Credit"/><category term="Monad"/><category term="Mutual SSL"/><category term="Mystery Trader"/><category term="Netbook"/><category term="New-York"/><category term="Noel"/><category term="OCaml"/><category term="Palindrome"/><category term="Paris"/><category term="Parser"/><category term="Philippe Petit"/><category term="RESTful"/><category term="RendezVous RV"/><category term="Rijndael"/><category term="SCALA 2.12"/><category term="San Francisco"/><category term="Scala 2.11"/><category term="ScalaFX"/><category term="Self Organizing Map"/><category term="Snail Algo"/><category term="Stock Plunge"/><category term="Sum"/><category term="TSP"/><category term="Top 14"/><category term="US Dollar"/><category term="Unstoppabble"/><category term="adsense"/><category term="antlr"/><category term="api"/><category term="bank"/><category term="beust"/><category term="bootcamp"/><category term="cab"/><category term="cell flashing"/><category term="cobra"/><category term="coding challenge"/><category term="color"/><category term="command line"/><category term="concatenate"/><category term="credit crunch"/><category term="eclipse"/><category term="editing"/><category term="elections 2007"/><category term="europe"/><category term="feed burner"/><category term="file transfer"/><category term="folder"/><category term="formulas"/><category term="frozen columns"/><category term="functional test"/><category term="games"/><category term="garbage collectors"/><category term="gateway"/><category term="greek tragedy"/><category term="grid"/><category term="gui"/><category term="hedge funds"/><category term="html5"/><category term="ibm"/><category term="ide"/><category term="java RMI"/><category term="java web start"/><category term="jide"/><category term="jmx"/><category term="job"/><category term="job losses"/><category term="joke"/><category term="jooq"/><category term="json"/><category term="language"/><category term="lending"/><category term="mac"/><category term="maths"/><category term="memory pie chart"/><category term="microsoft"/><category term="misc"/><category term="misery"/><category term="mondial 2010"/><category term="multi-touch"/><category term="music"/><category term="netbeans"/><category term="nexus one"/><category term="oogifu"/><category term="password manager"/><category term="politics"/><category term="pricing"/><category term="protobuf"/><category term="quick time crash"/><category term="rcp"/><category term="reflection"/><category term="remix"/><category term="root-finding algo"/><category term="ropsten"/><category term="ryanair"/><category term="solace"/><category term="solidity"/><category term="standard deviation"/><category term="stringify"/><category term="sun"/><category term="supergrid"/><category term="table"/><category term="tablet"/><category term="time machine"/><category term="usa"/><category term="vmr"/><category term="x509"/><category term="xml"/><category term="yanni"/><title type='text'>oogifu</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>285</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3158462809252108803</id><published>2020-07-29T06:21:00.001+00:00</published><updated>2020-07-29T06:21:57.966+00:00</updated><title type='text'>Self Quantified</title><content type='html'>https://quantified-self.io/</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3158462809252108803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3158462809252108803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3158462809252108803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3158462809252108803'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2020/07/self-quantified.html' title='Self Quantified'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-2698090986694360703</id><published>2020-07-13T07:53:00.001+00:00</published><updated>2020-07-13T07:53:50.298+00:00</updated><title type='text'>Very good series of post on RxJava</title><content type='html'>https://www.baeldung.com/rx-java</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/2698090986694360703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/2698090986694360703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2698090986694360703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2698090986694360703'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2020/07/very-good-series-of-post-on-rxjava.html' title='Very good series of post on RxJava'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-6006729488647914008</id><published>2020-02-15T03:01:00.001+00:00</published><updated>2020-02-15T03:01:30.337+00:00</updated><title type='text'>processing</title><content type='html'>&lt;a href=&quot;https://processing.org/&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/6006729488647914008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/6006729488647914008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/6006729488647914008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/6006729488647914008'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2020/02/processing.html' title='processing'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3814792773430515213</id><published>2019-12-19T05:13:00.000+00:00</published><updated>2019-12-19T05:13:02.929+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BIP32"/><category scheme="http://www.blogger.com/atom/ns#" term="KCD"/><title type='text'>BIP32 and Public KCD</title><content type='html'>&lt;a href=&quot;https://github.com/tjdragon/bip32&quot;&gt;https://github.com/tjdragon/bip32&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3814792773430515213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3814792773430515213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3814792773430515213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3814792773430515213'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/12/bip32-and-public-kcd.html' title='BIP32 and Public KCD'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-7333386661730087394</id><published>2019-12-19T05:10:00.002+00:00</published><updated>2019-12-19T05:12:23.172+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DEX"/><category scheme="http://www.blogger.com/atom/ns#" term="HEDERA"/><title type='text'>Hedera DEX</title><content type='html'>&lt;a href=&quot;https://github.com/hammadtq/hbardelta/tree/hedera_dex&quot;&gt;https://github.com/hammadtq/hbardelta/tree/hedera_dex&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/7333386661730087394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/7333386661730087394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7333386661730087394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7333386661730087394'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/12/hedera-dex.html' title='Hedera DEX'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-6817684254660931791</id><published>2019-11-30T03:26:00.001+00:00</published><updated>2019-11-30T03:26:09.922+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Unstoppabble"/><title type='text'>How To Launch An Unstoppable Website On IPFS In Under 3 Minutes!</title><content type='html'>&lt;a href=&quot;https://www.youtube.com/watch?v=I9vTeAtELOk&amp;list=WL&quot;&gt;How To Launch An Unstoppable Website On IPFS In Under 3 Minutes!&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/6817684254660931791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/6817684254660931791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/6817684254660931791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/6817684254660931791'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/11/how-to-launch-unstoppable-website-on.html' title='How To Launch An Unstoppable Website On IPFS In Under 3 Minutes!'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-2903575374428928699</id><published>2019-11-28T05:02:00.000+00:00</published><updated>2019-11-28T05:02:05.249+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="concatenate"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="stringify"/><title type='text'>How to stringify JSON for hashing and easy comparison in Java?</title><content type='html'>Or how to implement &lt;a href=&quot;https://github.com/substack/json-stable-stringify&quot;&gt;https://github.com/substack/json-stable-stringify&lt;/a&gt; in Java?

&lt;pre&gt;
    import com.fasterxml.jackson.databind.ObjectMapper;
    import com.fasterxml.jackson.databind.SerializationFeature;

    public static void stringify(final String jsonPath) throws Exception {
        final byte[] bytes = Files.readAllBytes(Paths.get(jsonPath));
        final String jsonData = new String(bytes);

        ObjectMapper om = new ObjectMapper();
        om.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
        Map&lt;String, Object&gt; map = om.readValue(jsonData, HashMap.class);
        String json = om.writeValueAsString(map);
    }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/2903575374428928699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/2903575374428928699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2903575374428928699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2903575374428928699'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/11/how-to-stringify-json-for-hashing-and.html' title='How to stringify JSON for hashing and easy comparison in Java?'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-1154832100993963612</id><published>2019-10-11T15:52:00.001+00:00</published><updated>2019-10-13T02:21:19.795+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="gateway"/><category scheme="http://www.blogger.com/atom/ns#" term="solace"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="vmr"/><title type='text'>Running the Solace VMR as an API Gateway on Ubuntu</title><content type='html'>Today&#39;s post is a step by step process to run the &lt;a href=&quot;https://docs.solace.com/Open-APIs-Protocols/REST-get-start.htm&quot;&gt;Solace VMR&lt;/a&gt; as an API Gateway. &lt;br/&gt;
There are several options for API gateways out there, but nothing comes close to the flexibility of the VMR. &lt;br/&gt;
This was tested on Ubuntu 18.&lt;br/&gt;

&lt;br/&gt;&lt;b&gt;Run the VMR as a docker container&lt;/b&gt;&lt;br/&gt;
Execute the following: docker run -d --net=host --shm-size=2g --security-opt apparmor:unconfined --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard

&lt;br/&gt;&lt;br/&gt;
You can use docker ps -a, or docker logs -f solace to check after a couple of minutes that all is well. Note that under Ubuntu you need to configure apparmor in unconfined mode for the VMR to run properly. Finally, also on Ubuntu, --net=host helps with network configuration if you test your set-up locally using a local micro-service.
&lt;br/&gt;
I am using &lt;a href=&quot;https://dockstation.io/&quot;&gt;DockStation&lt;/a&gt;, a great Linux tool to manage containers.&lt;br/&gt;

&lt;br/&gt;&lt;b&gt;Solace VMR configuration&lt;/b&gt;&lt;br/&gt;
Open a browser to point to &lt;a href=&quot;http://localhost:8080&quot;&gt;http://localhost:8080&lt;/a&gt; and login using the admin / admin credentials. Follow the steps to create a simple catch-all api gateway:
&lt;ul&gt;
 &lt;li&gt;Click on &quot;Message VPNs&quot; then &quot;default&quot;, then &quot;services&quot;
 &lt;li&gt;In the &quot;REST&quot; section, select &quot;gateway&quot;, then &quot;apply&quot;
 &lt;li&gt;Under &quot;Queues&quot;, create a queue &quot;CATCH_ALL_Q&quot;, apply then select
 &lt;li&gt;Under &quot;Subscriptions&quot;, create two subs: &quot;GET/&gt;&quot; and &quot;POST/&gt;&quot;, those will catch all GET and POST requests
 &lt;li&gt;Under &quot;Client Connections&quot;, select &quot;REST&quot;, create &quot;Delivery End Point&quot; named &quot;CATCH_ALL_DP&quot;, click &quot;Enabled&quot; and apply
 &lt;li&gt;Then select and go to &quot;Queue Bindings&quot;, add one, and select &quot;CATCH_ALL_Q&quot;
 &lt;li&gt;Create a REST consumer &quot;CATCH_ALL_RC&quot;, &quot;Enabled&quot; and select the host of your computer with port 9505, then apply. Under &quot;Client Connections&quot; the Operational State should be up if you have your micro-service listening on that port
&lt;/ul&gt;

In order to test it, execute &quot;curl http://localhost:9000/ping&quot; assuming you have a micro-service listening on port 9505, the VMR will act as an API Gateway - and forward the request to the micro-service. 
Voila!</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/1154832100993963612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/1154832100993963612' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/1154832100993963612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/1154832100993963612'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/10/running-solace-vmr-as-api-gateway-on.html' title='Running the Solace VMR as an API Gateway on Ubuntu'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-2537827815376871953</id><published>2019-10-06T02:06:00.003+00:00</published><updated>2019-10-06T02:06:46.611+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="color"/><category scheme="http://www.blogger.com/atom/ns#" term="folder"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>How to change folder&#39;s colors on Ubuntu 18</title><content type='html'>sudo apt-get update &amp;&amp; sudo apt-get install folder-color</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/2537827815376871953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/2537827815376871953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2537827815376871953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2537827815376871953'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/10/how-to-change-folders-colors-on-ubuntu.html' title='How to change folder&#39;s colors on Ubuntu 18'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-1415140741219421969</id><published>2019-05-14T10:58:00.002+00:00</published><updated>2019-05-14T10:58:29.822+00:00</updated><title type='text'>Google Drive for Linux / Ubuntu</title><content type='html'>&lt;a href=&quot;https://www.howtogeek.com/196635/an-official-google-drive-for-linux-is-here-sort-of-maybe-this-is-all-well-ever-get/&quot;&gt;https://www.howtogeek.com/196635/an-official-google-drive-for-linux-is-here-sort-of-maybe-this-is-all-well-ever-get/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/1415140741219421969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/1415140741219421969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/1415140741219421969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/1415140741219421969'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2019/05/google-drive-for-linux-ubuntu.html' title='Google Drive for Linux / Ubuntu'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-7944899391699118714</id><published>2018-11-11T06:19:00.000+00:00</published><updated>2018-11-11T06:19:12.142+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><category scheme="http://www.blogger.com/atom/ns#" term="remix"/><category scheme="http://www.blogger.com/atom/ns#" term="ropsten"/><category scheme="http://www.blogger.com/atom/ns#" term="solidity"/><title type='text'>A step-by-step guide for deploying a simple Solidity contract on a test network</title><content type='html'>This post relates to a simple smart contract written in &lt;a href=&quot;https://solidity.readthedocs.io/&quot;&gt;Solidity&lt;/a&gt; deployment on the &lt;a href=&quot;https://ropsten.etherscan.io/&quot;&gt;Ropsten test network&lt;/a&gt;.
It is a step-by-step deployment, giving as much detail as I could patiently gather..
&lt;br/&gt;
&lt;h2&gt;METAMASK&lt;/h2&gt;
&lt;i&gt;&quot;&lt;a href=&quot;https://metamask.io/&quot;&gt;MetaMask&lt;/a&gt; is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node.&quot;&lt;/i&gt;.
&lt;br/&gt;In a nutshell, it allows you to create an address and request ETH for testing.
Install the extension for Chrome or Mozilla and set it up as follows.
Start with the password creation (in my test I used 12345678910!)

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja82wnDwao1DB_rgdbvCXYc4hpMIjkkpmT4xsdcvOezO9s0hNBuYyoTW7GCAfhmIuVOHTJ87RtExgxeLT2wtWrOXZcQKy9jjpKF_WWad4B1P8smBWUL9eHC8PbKNLDeC-MZAsY5smNMuBu/s1600/metamask1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja82wnDwao1DB_rgdbvCXYc4hpMIjkkpmT4xsdcvOezO9s0hNBuYyoTW7GCAfhmIuVOHTJ87RtExgxeLT2wtWrOXZcQKy9jjpKF_WWad4B1P8smBWUL9eHC8PbKNLDeC-MZAsY5smNMuBu/s200/metamask1.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

You will now see this screenshot:

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBT3iZnWFkzX5m2TLjPybzg2G5MQrJwnjXcOVROpcpSfi1ghMYzmqDY7bT1LWsXVrbK1iQ0pE8-dlr1hG7XCToUdliyG0forUVAK9sg0Buqsy1R87rzQLSNB2WNDR0LisUycT1RbQ6JpR2/s1600/metamask2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBT3iZnWFkzX5m2TLjPybzg2G5MQrJwnjXcOVROpcpSfi1ghMYzmqDY7bT1LWsXVrbK1iQ0pE8-dlr1hG7XCToUdliyG0forUVAK9sg0Buqsy1R87rzQLSNB2WNDR0LisUycT1RbQ6JpR2/s200/metamask2.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

Then accept the various terms and conditions
Finally, set up the secret words and back them up (spray talk duck avocado access put lens slice bench donor wise survey) - and the next screen put them back in the same order - and confirm.
You will still see the following.

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg0jsrZPDaXl-KIdAilOS2FguI56anvsgcl9xTQa9paWxRjSI5B_ZckQ9_rpJxed79v5H9O4oNgnCpECHdJA4ndogrrqK_G-LkhNuqExvg45SN2rBqat93kPg4xnIn12lqvAu9P_EyVyOP/s1600/metamask3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg0jsrZPDaXl-KIdAilOS2FguI56anvsgcl9xTQa9paWxRjSI5B_ZckQ9_rpJxed79v5H9O4oNgnCpECHdJA4ndogrrqK_G-LkhNuqExvg45SN2rBqat93kPg4xnIn12lqvAu9P_EyVyOP/s200/metamask3.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

Now for the purpose of this exercise, select the &quot;Ropsten Test Network&quot; and click on &quot;deposit&quot; and select &quot;Test Faucet&quot; and click &quot;GET ETHER&quot;
A new tab opens to &lt;a href=&quot;https://faucet.metamask.io/&quot;&gt;https://faucet.metamask.io/&lt;/a&gt; and select &quot;reqest 1 ether from faucet&quot; (or few times)
A link like &lt;a href=&quot;https://ropsten.etherscan.io/tx/0x2bc952af0236ef3960bdcd22b1a637f07e1369b1c0b200063c38104ab9a3611e&quot;&gt;https://ropsten.etherscan.io/tx/0x2bc952af0236ef3960bdcd22b1a637f07e1369b1c0b200063c38104ab9a3611e&lt;/a&gt; will appear
once the transaction(s) has(have) been validated and mined - you will see the number of ETH appear on your METAMASK main window for the &quot;Ropsten Test Network&quot; 

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjllOkaTYDN9dvy7U2Tfe4fyw4ubHxcOQe8NBJfAybC7i1YBue5Rb1VAirxFmwBLdisWyQ3qb2Omu1EFCt4gcBJawBvt1VsUlNsp9qhdLzKdbS2OjIKqkUlI5pZw_Bk3LfutNq58DaOtuMc/s1600/metamask4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjllOkaTYDN9dvy7U2Tfe4fyw4ubHxcOQe8NBJfAybC7i1YBue5Rb1VAirxFmwBLdisWyQ3qb2Omu1EFCt4gcBJawBvt1VsUlNsp9qhdLzKdbS2OjIKqkUlI5pZw_Bk3LfutNq58DaOtuMc/s200/metamask4.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXeQKZuOjzEI7ruHSEUQcVEVjuzYYCrl6F2cqKoeduALmentPgSEdBwzLFWba-Uw-gcPvn1hmvoc90vT6IGac19WhlqWHGOJDIbDDYua0frvvbitubMeLobLFkB8m2EBcikwnZZ4FD-szS/s1600/metamask5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXeQKZuOjzEI7ruHSEUQcVEVjuzYYCrl6F2cqKoeduALmentPgSEdBwzLFWba-Uw-gcPvn1hmvoc90vT6IGac19WhlqWHGOJDIbDDYua0frvvbitubMeLobLFkB8m2EBcikwnZZ4FD-szS/s200/metamask5.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRRdir_m76lBBfrWnP4ihx3HiQiYyskE0A8Rr0t4671AFhApzJ3fo-0pePDddhVuE8hcGuw-D75qN5PX_uUPuWjHj-wlheCtA3WyBYJ-tQtvPT5TfUwjkdGfi0Wvftd0fWdUkUb4YELhje/s1600/metamask6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRRdir_m76lBBfrWnP4ihx3HiQiYyskE0A8Rr0t4671AFhApzJ3fo-0pePDddhVuE8hcGuw-D75qN5PX_uUPuWjHj-wlheCtA3WyBYJ-tQtvPT5TfUwjkdGfi0Wvftd0fWdUkUb4YELhje/s200/metamask6.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3dh3fT7ZX8NTO9NsBVDL8Qqaof0Ws2zikhcahFlCGctVoA3zWxyPX4QKHzRScn3h-fvuY82DyfrdEhEP5rH-KguwqXgRvwJJ2TICNo6QZd5IWcIMF-Y6uwAOJ7cmApA2NMHVauUCoSOP/s1600/metamask7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3dh3fT7ZX8NTO9NsBVDL8Qqaof0Ws2zikhcahFlCGctVoA3zWxyPX4QKHzRScn3h-fvuY82DyfrdEhEP5rH-KguwqXgRvwJJ2TICNo6QZd5IWcIMF-Y6uwAOJ7cmApA2NMHVauUCoSOP/s200/metamask7.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_534rTMRjBIaaAco82qSGjnufTD8_CoKJcOS87fR8iCcuLZm67jSBixnkZJ1S8eDrcj8YHqMljnW-LH_bPcdFLVvwVdn3WIoT96lro042ub-JYBemFipfeWDMPsNLBmGLRDBXZHl0gTiu/s1600/metamask8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_534rTMRjBIaaAco82qSGjnufTD8_CoKJcOS87fR8iCcuLZm67jSBixnkZJ1S8eDrcj8YHqMljnW-LH_bPcdFLVvwVdn3WIoT96lro042ub-JYBemFipfeWDMPsNLBmGLRDBXZHl0gTiu/s200/metamask8.png&quot; width=&quot;140&quot; height=&quot;200&quot; data-original-width=&quot;439&quot; data-original-height=&quot;628&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEuXH125cCe-fqIYvwoGkYO1aJuUEQDVjneOpYS1feF6DZssxQEYdPRh6RTd08e_2bNn8Afvub-4NbXVdyYSViybGWLuolW3-4UqN4yLN-K92QQrmX7Btb6i0rZ07TvIdctwcJe9ULHMnM/s1600/metamask9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEuXH125cCe-fqIYvwoGkYO1aJuUEQDVjneOpYS1feF6DZssxQEYdPRh6RTd08e_2bNn8Afvub-4NbXVdyYSViybGWLuolW3-4UqN4yLN-K92QQrmX7Btb6i0rZ07TvIdctwcJe9ULHMnM/s200/metamask9.png&quot; width=&quot;127&quot; height=&quot;200&quot; data-original-width=&quot;300&quot; data-original-height=&quot;473&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h2&gt;SOLIDITY&lt;/h2&gt;
Now on to the Solidity contract and coding/deployment/testing on the test network.
Head towards &lt;a href=&quot;https://remix.ethereum.org&quot;&gt;https://remix.ethereum.org&lt;/a&gt;

Under the tab &#39;run&#39; select (if not already) &#39;environment&#39; to be &#39;Injected Web&#39; - and the test account we created should appear with the number of ETH requested by Faucet.

We just need to write and deploy a contract...
What about a simple contract to store the hash of a public document to validate the fact that it has not been modified?

&lt;pre&gt;
pragma solidity ^0.4.7;

contract HashedDocsDemo {
    mapping (string =&gt; string) urlsDocHashMaps;
    
    function setHash(string url, string hash) public validStr(url) validStr(hash) {
        urlsDocHashMaps[url] = hash;
    }
    
    function checkHash(string url, string hash) public view validStr(url) validStr(hash) returns(bool) {
        string memory storedHash = urlsDocHashMaps[url];
        return keccak256(bytes(storedHash)) == keccak256(bytes(hash));
    }
    
    modifier validStr(string str) {
        bytes memory bstr = bytes(str); 
        require(bstr.length != 0, &quot;invalid string&quot;);
        _;
    }
}
&lt;/pre&gt;

Once the contract has been pasted in the Remix IDE, go to &quot;run&quot; and click on deploy.

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpqb7G-vRKLTrqIpZ9lLQDxf9_zlDVGl3Ye-ohIp96A7bshMkVy0BbCU-FeR9h918JlBTgmXwbBR4x_OQrXZjVaySw2bcWEEXgW_X9-lOiQ4UvimLDaz2K-bc0xErZmgkRmDVcIlXi01dg/s1600/remix1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpqb7G-vRKLTrqIpZ9lLQDxf9_zlDVGl3Ye-ohIp96A7bshMkVy0BbCU-FeR9h918JlBTgmXwbBR4x_OQrXZjVaySw2bcWEEXgW_X9-lOiQ4UvimLDaz2K-bc0xErZmgkRmDVcIlXi01dg/s200/remix1.png&quot; width=&quot;200&quot; height=&quot;92&quot; data-original-width=&quot;397&quot; data-original-height=&quot;183&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRzlZ_wwBlqvaxB0x5sHB68f70ly_4PYVIh0rHbMlJdSRMxwuCDPF6041f2fgmlOS9MV6cs05IA8hRJsdhKVI2fyJRMqq4Ab4KPywVbtUhjL3KSpaSc2gtfQk2KL5QgNYoL6e_Uk70x-nm/s1600/remix2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRzlZ_wwBlqvaxB0x5sHB68f70ly_4PYVIh0rHbMlJdSRMxwuCDPF6041f2fgmlOS9MV6cs05IA8hRJsdhKVI2fyJRMqq4Ab4KPywVbtUhjL3KSpaSc2gtfQk2KL5QgNYoL6e_Uk70x-nm/s200/remix2.png&quot; width=&quot;200&quot; height=&quot;172&quot; data-original-width=&quot;397&quot; data-original-height=&quot;342&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A window will popup and &quot;click&quot; confirm.

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq_IcbOBIEg_sE64CKiN6YuYbcjWV6gGgYtvyas8vaguGzqNl3YzMvEnUYmvimjDhqrBJEISghoGyMQyJm-rffQTpxdruoyJxU23Y7PZIHn8nDZrAMc7Rfy1Sv2c5OMRV2p1e-Gq0Sphdl/s1600/remix3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq_IcbOBIEg_sE64CKiN6YuYbcjWV6gGgYtvyas8vaguGzqNl3YzMvEnUYmvimjDhqrBJEISghoGyMQyJm-rffQTpxdruoyJxU23Y7PZIHn8nDZrAMc7Rfy1Sv2c5OMRV2p1e-Gq0Sphdl/s200/remix3.png&quot; width=&quot;111&quot; height=&quot;200&quot; data-original-width=&quot;360&quot; data-original-height=&quot;648&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

Another URL will be displayed (like &lt;a href=&quot;https://ropsten.etherscan.io/tx/0xc551c6c2237c4faad697faf65bdd3d3a407914f1574b2a931871f3552154b93d&quot;&gt;https://ropsten.etherscan.io/tx/0xc551c6c2237c4faad697faf65bdd3d3a407914f1574b2a931871f3552154b93d&lt;/a&gt;) - same thing - wait for mining and effective contract deployment (&quot;This transaction has been included into BlockNo #4400698 And will be reflected in a shortwhile&quot;)

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNJDjEytyuMQ5istUWXzJS2mKy2gxeZhyphenhyphenJ1LFpOOKNLxZhotFslxgfB8rBgaOmY2kHYso6KQYKggjWWuQIbUHNAighRzkpWNKDABv0XsQ5nJDH3Y2bpLV9CzBNPjOFGX7u8dFHoS55x5uj/s1600/etherscan1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNJDjEytyuMQ5istUWXzJS2mKy2gxeZhyphenhyphenJ1LFpOOKNLxZhotFslxgfB8rBgaOmY2kHYso6KQYKggjWWuQIbUHNAighRzkpWNKDABv0XsQ5nJDH3Y2bpLV9CzBNPjOFGX7u8dFHoS55x5uj/s200/etherscan1.png&quot; width=&quot;200&quot; height=&quot;111&quot; data-original-width=&quot;1136&quot; data-original-height=&quot;632&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

We can finally interact with the contract - still in Remix - in the Run tab

Enter any URL with any hash - then &quot;transact&quot; - same pop-up - confirm a new link is displayed: &lt;a href=&quot;https://ropsten.etherscan.io/tx/0xe3c8af1e041405c53b2bf2ba300a947b3ba2a284f8f0ddce1187658f118557ce&quot;&gt;https://ropsten.etherscan.io/tx/0xe3c8af1e041405c53b2bf2ba300a947b3ba2a284f8f0ddce1187658f118557ce&lt;/a&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7KwxTp910DoSUx7W4vHXha6CE1tIoEomX1nvbtYW_LLRcK1r5W4fRpF7oyOfT5osSk1HcuwL8Q6lpOCEoRdEGmEDH8MSGiUPYgpONqs-X7uhyrUsPltInxGSSm1gIsypUsOZ17UCedizr/s1600/remix4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7KwxTp910DoSUx7W4vHXha6CE1tIoEomX1nvbtYW_LLRcK1r5W4fRpF7oyOfT5osSk1HcuwL8Q6lpOCEoRdEGmEDH8MSGiUPYgpONqs-X7uhyrUsPltInxGSSm1gIsypUsOZ17UCedizr/s200/remix4.png&quot; width=&quot;119&quot; height=&quot;200&quot; data-original-width=&quot;391&quot; data-original-height=&quot;658&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS7WOG2J37MJ7FhK5Wcm_tWsWzctIvCUd5bzWuRp2oNklBBjr4t3HlnNrN3xBGApDFq1CEfhZZwq8WskQGg2QiEmPqhvo3MNoavAdkBvQj6SZQOt-fHdrmOvVlTE2uM8Fi4LbuBlYIfuKH/s1600/etherscan2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS7WOG2J37MJ7FhK5Wcm_tWsWzctIvCUd5bzWuRp2oNklBBjr4t3HlnNrN3xBGApDFq1CEfhZZwq8WskQGg2QiEmPqhvo3MNoavAdkBvQj6SZQOt-fHdrmOvVlTE2uM8Fi4LbuBlYIfuKH/s200/etherscan2.png&quot; width=&quot;200&quot; height=&quot;111&quot; data-original-width=&quot;1137&quot; data-original-height=&quot;632&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

Wait for confirmation - then you can look at the Remix ide, at the bottom, details of the transaction that went through and &quot;decoded input&quot; ....

</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/7944899391699118714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/7944899391699118714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7944899391699118714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7944899391699118714'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2018/11/a-step-by-step-guide-for-deploying.html' title='A step-by-step guide for deploying a simple Solidity contract on a test network'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja82wnDwao1DB_rgdbvCXYc4hpMIjkkpmT4xsdcvOezO9s0hNBuYyoTW7GCAfhmIuVOHTJ87RtExgxeLT2wtWrOXZcQKy9jjpKF_WWad4B1P8smBWUL9eHC8PbKNLDeC-MZAsY5smNMuBu/s72-c/metamask1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-8647896241019157780</id><published>2018-09-21T15:37:00.002+00:00</published><updated>2018-09-21T15:37:46.045+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><title type='text'>Fun with Ethereum</title><content type='html'>Hi,

If you want to play with Ethereum, locally, I would suggest to read the following blogs: &lt;a href=&quot;https://medium.com/@s4saif.121/demystifying-ethereum-private-blockchain-74f78ddf76fb&quot;&gt;Demystifying Ethereum Private Blockchain in less than 4 minutes!&lt;/a&gt; and &lt;a href=&quot;https://medium.com/cybermiles/running-a-quick-ethereum-private-network-for-experimentation-and-testing-6b1c23605bce&quot;&gt;Running a “quick” Ethereum private network for experimentation and testing&lt;/a&gt;

&lt;br/&gt;

I run Ubuntu 16 it was a breeze to download the code, compile it, and run a mining node locally, as well as submitting transactions using web3.</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/8647896241019157780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/8647896241019157780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8647896241019157780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8647896241019157780'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2018/09/fun-with-ethereum.html' title='Fun with Ethereum'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-2391812967074911593</id><published>2018-05-08T08:36:00.002+00:00</published><updated>2018-05-08T08:36:40.286+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JDK 10"/><title type='text'>JDK 10 New Features</title><content type='html'>&lt;a href=&quot;https://www.azul.com/109-new-features-in-jdk-10/&quot;&gt;https://www.azul.com/109-new-features-in-jdk-10/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/2391812967074911593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/2391812967074911593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2391812967074911593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/2391812967074911593'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2018/05/jdk-10-new-features.html' title='JDK 10 New Features'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-8769478597382852459</id><published>2017-09-21T08:44:00.000+00:00</published><updated>2017-09-21T08:44:10.242+00:00</updated><title type='text'>Monitoring, Alerts, and Google Compute</title><content type='html'>Have you ever looked for a simple, cheap and efficient solution to get alerts for a system that is not based on emails (as most of us get hundreds of those per day), or where you would need to look at a screen 24x7 to see a label color change from green to red?
&lt;br/&gt;
I thought of using &lt;a href=&quot;https://core.telegram.org/bots&quot;&gt;bots from Telegram&lt;/a&gt; to broadcast critical alerts to a Telegram group - and as I wanted to try Google Compute - to deploy the process on &lt;a href=&quot;https://cloud.google.com/compute/&quot;&gt;Google Compute Engine.&lt;/a&gt;
&lt;br/&gt;
Code has been written in &lt;a href=&quot;https://kotlinlang.org/&quot;&gt;Kotlin&lt;/a&gt;

&lt;br/&gt;&lt;br/&gt;
&lt;h3&gt;Kotlin/Telegram Code&lt;/h3&gt;

&lt;h4&gt;pom.xml&lt;/h4&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
         xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;

    &amp;lt;groupId&amp;gt;morse&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;morse-tg&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;kotlin.version&amp;gt;1.1.4-3&amp;lt;/kotlin.version&amp;gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;sourceDirectory&amp;gt;src/main/kotlin&amp;lt;/sourceDirectory&amp;gt;
        &amp;lt;testSourceDirectory&amp;gt;src/test/kotlin&amp;lt;/testSourceDirectory&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.jetbrains.kotlin&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;kotlin-maven-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;${kotlin.version}&amp;lt;/version&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;id&amp;gt;compile&amp;lt;/id&amp;gt;
                        &amp;lt;phase&amp;gt;compile&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;compile&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;id&amp;gt;test-compile&amp;lt;/id&amp;gt;
                        &amp;lt;phase&amp;gt;test-compile&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;test-compile&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;jvmTarget&amp;gt;1.8&amp;lt;/jvmTarget&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;exec-maven-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;mainClass&amp;gt;morse.SupportBot&amp;lt;/mainClass&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jetbrains.kotlin&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;kotlin-stdlib-jre8&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;${kotlin.version}&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jetbrains.kotlin&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;kotlin-test&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;${kotlin.version}&amp;lt;/version&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.telegram&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;telegrambots&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.3&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

    &amp;lt;/dependencies&amp;gt;

&amp;lt;/project&amp;gt;
&lt;/pre&gt;

&lt;h4&gt;kt code&lt;/h4&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;
package morse

import org.telegram.telegrambots.ApiContextInitializer
import org.telegram.telegrambots.TelegramBotsApi
import org.telegram.telegrambots.logging.BotLogger
import java.util.*
import java.util.logging.Level


class SupportBot : TimerTask() {
    lateinit var longPollHandler:LongPollingHandler

    override fun run() {
        longPollHandler.broadcast()
    }

    fun broadcast() {
        val timer = Timer()
        timer.schedule(this, 10_000, 60_000)
    }

    fun init() {
        BotLogger.info(&quot;SupportBot&quot;, &quot;init()&quot;)
        ApiContextInitializer.init()

        BotLogger.setLevel(Level.ALL)

        val botAPI = TelegramBotsApi()
        BotLogger.info(&quot;SupportBot&quot;, &quot;registering...()&quot;)

        longPollHandler = LongPollingHandler()
        botAPI.registerBot(longPollHandler)
        botAPI.registerBot(WebhookHandler())
        BotLogger.info(&quot;SupportBot&quot;, &quot;Registered Handler&quot;)
    }

    companion object {
        @JvmStatic fun main(args: Array&lt;String&gt;) {
            BotLogger.info(&quot;SupportBot&quot;, &quot;SupportBot&quot;)

            val bot = SupportBot()
            bot.init()
            bot.broadcast()
        }
    }
}

package morse

object Cred {
    val bot = &quot;&lt;bot user name&gt;&quot;
    val token = &quot;&lt;bot token&gt;&quot;
}

package morse

import org.telegram.telegrambots.api.methods.BotApiMethod
import org.telegram.telegrambots.api.objects.Update
import org.telegram.telegrambots.bots.TelegramWebhookBot
import java.util.*

class WebhookHandler : TelegramWebhookBot() {
    override fun getBotUsername() : String = Cred.bot

    override fun getBotToken(): String = Cred.token

    override fun getBotPath(): String = UUID.randomUUID().toString()

    override fun onWebhookUpdateReceived(update: Update?): BotApiMethod&lt;*&gt;? {
        return null
    }
}

package morse

import org.telegram.telegrambots.api.methods.send.SendMessage
import org.telegram.telegrambots.api.objects.Update
import org.telegram.telegrambots.bots.TelegramLongPollingBot
import org.telegram.telegrambots.logging.BotLogger
import java.util.*


class LongPollingHandler : TelegramLongPollingBot() {
    override fun getBotUsername(): String = Cred.bot

    override fun getBotToken(): String = Cred.token

    override fun onUpdateReceived(update: Update?) {
        BotLogger.info(&quot;LongPollingHandler&quot;, update.toString())
        try {
            if (update?.hasMessage()!!) {
                val message = update.message
                if (message.hasText()) {
                    val sendMessageReq = SendMessage()
                    sendMessageReq.setChatId(message.chatId)
                    sendMessageReq.text = &quot;You just told me &quot; + message.text
                    sendMessage(sendMessageReq)
                }
            }
        } catch (t: Throwable) {
            BotLogger.error(&quot;onUpdateReceived&quot;, t)
        }
    }

    fun broadcast() {
        BotLogger.info(&quot;LongPollingHandler&quot;, &quot;broadcast&quot;)

        val sendMessageReq = SendMessage()
        sendMessageReq.chatId = &quot;A negative chat it you get when added to the group&quot;
        sendMessageReq.text = &quot;Random message sent from Google Cloud at &quot; + Date()
        sendMessage(sendMessageReq)
    }
}
&lt;/pre&gt;

maven was used to build, package and run this code.

&lt;br/&gt;&lt;br/&gt;
&lt;h3&gt;Google Compute Engine&lt;/h3&gt;

The easiest part! Nothing much to say. I went for the simple CPU/Mem option available, installed Java 8, Maven, uploaded my code, built entirely locally, and ran it via maven exec:java

&lt;br/&gt;&lt;br/&gt;
&lt;h3&gt;Result!&lt;/h3&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbGbSeH0PUeg5GVDI8uYjIIfGMAY8eGXeHhacmFBLzla1stjo3BLm1NaNRy51jVKe-BYUIX47hMTehUpwvQl6QzV-n_qN1Mr85eVKu08xAhuJczc-GscRjLRX92JAEO3YtIVvjjbrSGeI0/s1600/Telegram.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbGbSeH0PUeg5GVDI8uYjIIfGMAY8eGXeHhacmFBLzla1stjo3BLm1NaNRy51jVKe-BYUIX47hMTehUpwvQl6QzV-n_qN1Mr85eVKu08xAhuJczc-GscRjLRX92JAEO3YtIVvjjbrSGeI0/s320/Telegram.png&quot; width=&quot;181&quot; height=&quot;320&quot; data-original-width=&quot;907&quot; data-original-height=&quot;1600&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/8769478597382852459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/8769478597382852459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8769478597382852459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8769478597382852459'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2017/09/monitoring-alerts-and-google-compute.html' title='Monitoring, Alerts, and Google Compute'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbGbSeH0PUeg5GVDI8uYjIIfGMAY8eGXeHhacmFBLzla1stjo3BLm1NaNRy51jVKe-BYUIX47hMTehUpwvQl6QzV-n_qN1Mr85eVKu08xAhuJczc-GscRjLRX92JAEO3YtIVvjjbrSGeI0/s72-c/Telegram.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3465694510029242352</id><published>2016-12-15T01:34:00.002+00:00</published><updated>2018-11-11T08:44:46.387+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FIX"/><category scheme="http://www.blogger.com/atom/ns#" term="FIXML"/><title type='text'>Decode Your FIX has gone SSL</title><content type='html'>&lt;a href=&quot;https://www.fixdecoding.org/&quot;&gt;https://www.fixdecoding.org/&lt;/a&gt; is a web site developed by &lt;a href=&quot;https://www.linkedin.com/in/pnphoa&quot;&gt;Paul&lt;/a&gt; and &lt;a href=&quot;https://www.linkedin.com/in/janaudy/&quot;&gt;myself&lt;/a&gt;. Free of use :-)</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3465694510029242352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3465694510029242352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3465694510029242352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3465694510029242352'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/12/decode-your-fix-has-gone-ssl.html' title='Decode Your FIX has gone SSL'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-9146494347807043845</id><published>2016-11-28T11:02:00.001+00:00</published><updated>2016-11-29T08:50:39.399+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><title type='text'>Ethereum Wallet is amazingly slow to sync</title><content type='html'>Since the last hard fork, and I must say, even before that, I am struggling with the use of &lt;a href=&quot;https://github.com/ethereum/mist/releases&quot;&gt;ethereum mist&lt;/a&gt;.
What a nightmare, does not sync up, very slow, 27,000 blocks behind and no sync end in view...
&lt;br/&gt;
According to the logs, worst case, it takes 40 secs to get one block, 27,000 blocks, more than 12 days! What!</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/9146494347807043845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/9146494347807043845' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/9146494347807043845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/9146494347807043845'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/11/ethereum-wallet-is-amazingly-slow-to.html' title='Ethereum Wallet is amazingly slow to sync'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-8112526249764811629</id><published>2016-11-20T02:02:00.000+00:00</published><updated>2016-11-20T02:02:22.530+00:00</updated><title type='text'>BTC to ETH</title><content type='html'>From my previous post &lt;a href=&quot;http://oogifu.blogspot.sg/2016/11/first-experience-with-ethereum.html&quot;&gt;first-experience-with-ethereum&lt;/a&gt;, you would have read that I was waiting for my transaction to go through to buy ETH from BTC. &lt;br/&gt;
I submitted the transaction on 18/11/2016 at 16:39 - it finally went &lt;a href=&quot;https://blockchain.info/address/1GymAL39VWnwPkWXSAbgLsanJqcjz1doyw&quot;&gt;through&lt;/a&gt; more than a day later.....</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/8112526249764811629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/8112526249764811629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8112526249764811629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8112526249764811629'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/11/from-my-previous-post-first-experience.html' title='BTC to ETH'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3537285422535904732</id><published>2016-11-19T13:33:00.001+00:00</published><updated>2016-11-28T11:07:53.202+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bitcoin"/><category scheme="http://www.blogger.com/atom/ns#" term="BTC"/><category scheme="http://www.blogger.com/atom/ns#" term="ETH"/><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><title type='text'>First experience with Ethereum</title><content type='html'>Some Saturday experiment while the kids are having fun...
While drinking coffee... a thought, I want to mine!
&lt;br/&gt;
Obviously long gone are the days where I could earn BTC while mining on a commodity laptop (about 4 millions years on mine according to the latest number of hashes needed 2^68).
&lt;br/&gt;
So... with the promise of GPU mining (I am using OpenCL) with &lt;a href=&quot;https://www.ethereum.org/&quot;&gt;Ethereum&lt;/a&gt; - I decided to give it a try.
&lt;br/&gt;
Please note that I am using Ubuntu 16.04
&lt;ul&gt;
&lt;li&gt;Installing the Ethereum wallet was a breeze - quite easy to set up - and interestingly - as part of the set up - I was asked if I wanted to buy some ETH from my Bicoin wallet&lt;/li&gt;
&lt;li&gt;Of course... I did it - and issued a small transaction from my bitcoin client to the given Ethereum address&lt;/li&gt;
&lt;li&gt;I issued a small payment of 0.005 BTC (3.74 USD) with a transaction fee of 0.00007329 BTC (0.05 USD). I sent my transaction on 18/11/2016 at 16:39 - and at the time of writing this post, i.e., more than 15 hours later, my transaction is still unconfirmed in the memory pool! If you understand the transaction fees concept and how miners can decide to do whatever they want... it is not surprising that my transaction would be at the bottom of stack. This simply proves, if any proof was needed, that Bitcoin is not ready for micro-payments, and probably will never be until this ASIC mining non-sense - must using ASIC (Application-specific integrated circuit) is sorted out&lt;/li&gt;
&lt;li&gt;While waiting for my transaction from BTC to ETH to go through... if it ever happens.... I decided to run the mining software in GPU mode, &lt;a href=&quot;https://ethermine.org/&quot;&gt;Ethermine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I recommend to recompile from the source directly - it is the easiest and fastest way to get going&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3537285422535904732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3537285422535904732' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3537285422535904732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3537285422535904732'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/11/first-experience-with-ethereum.html' title='First experience with Ethereum'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3414714572430119189</id><published>2016-11-18T00:17:00.003+00:00</published><updated>2016-11-18T00:17:44.953+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DECODE"/><category scheme="http://www.blogger.com/atom/ns#" term="DECODER"/><category scheme="http://www.blogger.com/atom/ns#" term="FIX"/><category scheme="http://www.blogger.com/atom/ns#" term="FIXML"/><title type='text'>Decoding your FIX messages</title><content type='html'>Looking for an easy way to decode your FIX messages, entirely local to the browser?
&lt;br/&gt;
Use &lt;a href=&quot;http://decodeyourfix.com/&quot;&gt;http://decodeyourfix.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3414714572430119189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3414714572430119189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3414714572430119189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3414714572430119189'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/11/decoding-your-fix-messages.html' title='Decoding your FIX messages'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-8732094435427015627</id><published>2016-11-10T07:50:00.000+00:00</published><updated>2016-11-10T07:50:26.532+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCALA 2.12"/><title type='text'>SCALE 2.12 + JAVA 8</title><content type='html'>I can confirm I can now use SCALA 2.12 with JAVA 8 libs ... :-)
This piece of code, using &lt;a href=&quot;http://sparkjava.com/&quot;&gt;http://sparkjava.com/&lt;/a&gt; I could not do before, now can:

&lt;pre&gt;
package demo1

import spark.Spark.get

object MicroService {
  def main(args: Array[String]): Unit = {
    get(&quot;/hello&quot;, (req, res) =&gt; &quot;Hello World&quot;)
  }
}
&lt;/pre&gt;

Nice!</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/8732094435427015627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/8732094435427015627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8732094435427015627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/8732094435427015627'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/11/scale-212-java-8.html' title='SCALE 2.12 + JAVA 8'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3132084424400151622</id><published>2016-10-14T10:27:00.001+00:00</published><updated>2016-10-14T10:27:22.557+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="functional test"/><title type='text'>Looking for a functional test framework?</title><content type='html'>Go &lt;a href=&quot;http://spockframework.org/&quot;&gt;SPOCK&lt;/a&gt;!</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3132084424400151622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3132084424400151622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3132084424400151622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3132084424400151622'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/10/looking-for-functional-test-framework.html' title='Looking for a functional test framework?'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3046858522677315970</id><published>2016-10-13T13:26:00.000+00:00</published><updated>2016-10-13T13:26:26.118+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Kotlin"/><title type='text'>Android SDK</title><content type='html'>Is it time for Google to start switching from &lt;a href=&quot;https://www.oracle.com/java/index.html&quot;&gt;Java&lt;/a&gt; to &lt;a href=&quot;https://kotlinlang.org/&quot;&gt;Kotlin&lt;/a&gt; for its Android development language?
This makes sense right? First move is to use &lt;a href=&quot;https://www.jetbrains.com/idea/&quot;&gt;IntelliJ&lt;/a&gt;, second step, introduce Kotlin as an alternative language, third step, remove Java.</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3046858522677315970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3046858522677315970' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3046858522677315970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3046858522677315970'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/10/android-sdk.html' title='Android SDK'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-7448449994498080351</id><published>2016-10-07T12:30:00.000+00:00</published><updated>2016-10-07T12:30:26.723+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Drive"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Ubuntu</title><content type='html'>I love &lt;a href=&quot;https://www.ubuntu.com/desktop&quot;&gt;Ubuntu&lt;/a&gt;, stable, great UI, etc... but what stops me from switching 100%?
The lack of a good, stable, &lt;a href=&quot;https://www.google.com/drive/&quot;&gt;Google Drive&lt;/a&gt; client...</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/7448449994498080351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/7448449994498080351' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7448449994498080351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/7448449994498080351'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/10/ubuntu.html' title='Ubuntu'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-5713463441195127683</id><published>2016-05-18T08:40:00.000+00:00</published><updated>2016-05-18T08:40:04.863+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google cloud SDK"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 8"/><title type='text'>Google Cloud SDK</title><content type='html'>If you are like me, wondering what to go for when doing &lt;b&gt;Google Cloud SDK&lt;/b&gt; work - and you are confused about what SDK to go for, go for &lt;a href=&quot;https://cloud.google.com/appengine/docs/flexible/java/quickstart&quot;&gt;&quot;App Engine Flexible&quot;&lt;/a&gt;.
&lt;br/&gt;
I can easily run Java 8 code in the cloud now!</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/5713463441195127683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/5713463441195127683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/5713463441195127683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/5713463441195127683'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/05/google-cloud-sdk.html' title='Google Cloud SDK'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1436098877388372574.post-3753954613198778160</id><published>2016-05-01T02:21:00.000+00:00</published><updated>2016-05-01T02:21:55.219+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jooq"/><category scheme="http://www.blogger.com/atom/ns#" term="Scala"/><category scheme="http://www.blogger.com/atom/ns#" term="Scalatra"/><title type='text'>Scala, Maven, jOOQ, Scalatra</title><content type='html'>This post is about sharing some wonderful experience: using Scala, Scalatra, jOOQ altogether makes me a happy developer. &lt;br/&gt;
Now, there is nothing sexy about this post - it is not cutting edge, there is no big data involved, no AI, just simple tools that I think make a software engineer&#39;s life happier and fun. &lt;br/&gt;
I have embraced some parts of functional programming in Java 8 - sometimes it is quite difficult to read and debug - but it is clear and concise - less error prone - you know the usual shebang. &lt;br/&gt;
I still think that Scala has an edge over Java 8 - but I must say that I cannot wait for Scala 2.12 - as the binary compatibility and compilation speed are big issues. &lt;br/&gt;
The Scala IDE is great - but not there yet if you ask me, and I would hate to go and use IntelliJ - just not the tool for me.&lt;br/&gt;&lt;br/&gt;
This post is about using Scala with Maven, and some really cool stuff using Scalatra and jOOQ to build a simple RESTful server.
&lt;br/&gt;&lt;br/&gt;

&lt;h3&gt;pom.xml&lt;/h3&gt;
All you need for dependencies in one epic pom.xml
&lt;pre class=&quot;prettyprint&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
         xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;

    &amp;lt;groupId&amp;gt;Pento&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;PentoPay&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;pluginManagement&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;net.alchim31.maven&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;scala-maven-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;3.2.1&amp;lt;/version&amp;gt;
                &amp;lt;/plugin&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;2.0.2&amp;lt;/version&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/pluginManagement&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;net.alchim31.maven&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;scala-maven-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;id&amp;gt;scala-compile-first&amp;lt;/id&amp;gt;
                        &amp;lt;phase&amp;gt;process-resources&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;add-source&amp;lt;/goal&amp;gt;
                            &amp;lt;goal&amp;gt;compile&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;id&amp;gt;scala-test-compile&amp;lt;/id&amp;gt;
                        &amp;lt;phase&amp;gt;process-test-resources&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;testCompile&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;
            &amp;lt;/plugin&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;phase&amp;gt;compile&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;compile&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jooq&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jooq&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.7.3&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jooq&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jooq-meta&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.7.3&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jooq&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jooq-codegen&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.7.3&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.jooq&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jooq-scala&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.7.3&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.scalatra&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;scalatra_2.11&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;2.4.0&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;com.google.inject&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;guice&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;4.0&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;javax.servlet-api&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.1.0&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.eclipse.jetty&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jetty-server&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;9.3.8.v20160314&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.eclipse.jetty&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jetty-webapp&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;9.3.8.v20160314&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;slf4j-simple&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;1.7.21&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;derby&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;10.12.1.1&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;derbyclient&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;10.12.1.1&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;com.zaxxer&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;HikariCP&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;2.4.5&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;

    &amp;lt;/dependencies&amp;gt;
    
&amp;lt;/project&amp;gt;
&lt;/pre&gt;

&lt;h2&gt;Scalatra&lt;/h2&gt;
Using &lt;a href=&quot;http://scalatra.org/&quot;&gt;Scalatra&lt;/a&gt;, the bootstrap class (with Guice Module for DI), the servlet definition and the launcher

&lt;pre class=&quot;prettyprint&quot;&gt;
import javax.servlet.ServletContext

import com.google.inject.Guice
import org.pento.services.{PingModule, PingService}
import org.scalatra.LifeCycle

class ScalatraBootstrap extends LifeCycle {
  private lazy val injector = Guice.createInjector(new PingModule())

  override def init(context: ServletContext): Unit = {
    context mount (injector.getInstance(classOf[PingService]), &quot;/main-service/&quot;)
  }
}
&lt;/pre&gt;


&lt;pre class=&quot;prettyprint&quot;&gt;
package org.pento.services

import java.time.Clock

import com.google.inject.{AbstractModule, Provides, Singleton}

class PingModule extends AbstractModule {
  override def configure(): Unit = {
    bind(classOf[PingService]).asEagerSingleton()
  }

  @Provides @Singleton
  def provideClock() = Clock.systemUTC()
}
&lt;/pre&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
package org.pento.services

import java.time.Clock
import javax.inject.Inject

import org.scalatra.ScalatraServlet

class PingService @Inject() (val clock: Clock) extends ScalatraServlet {
  get (&quot;/ping&quot;) {
    clock.millis()
  }
}
&lt;/pre&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
package org.pento.services

import org.eclipse.jetty.server.Server
import org.eclipse.jetty.servlet.DefaultServlet
import org.eclipse.jetty.webapp.WebAppContext
import org.scalatra.servlet.ScalatraListener

object PentoServer {
  val server = new Server(5899)
  val context = new WebAppContext()
  context.setContextPath(&quot;/&quot;)
  context.setResourceBase(&quot;src/main/scala&quot;)
  context.addEventListener(new ScalatraListener)
  context.addServlet(classOf[DefaultServlet], &quot;/&quot;)
  server.setHandler(context)

  server.start()
  server.join()

  def main(args: Array[String]) {

  }
}
&lt;/pre&gt;

Neat. Simple.

&lt;h2&gt;Now to the database and jooq code generation&lt;/h2&gt;

Who writes SQL those days? Well we have to.. but not in the code. &lt;a href=&quot;http://www.jooq.org/&quot;&gt;jOOQ&lt;/a&gt; is probably one of the best libs I have used from Java and SCALA.
Here is a simple jOOQ config that generates code from a given existing schema

&lt;pre class=&quot;prettyprint&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&amp;gt;
&amp;lt;configuration&amp;gt;
    &amp;lt;!-- Configure the database connection here --&amp;gt;
    &amp;lt;jdbc&amp;gt;
        &amp;lt;driver&amp;gt;org.apache.derby.jdbc.ClientDriver&amp;lt;/driver&amp;gt;
        &amp;lt;url&amp;gt;jdbc:derby://localhost:1527/C:/Users/tj/Google Drive/IT-Projects/PentoPay/derby/PentoDb;create=true&amp;lt;/url&amp;gt;
        &amp;lt;user&amp;gt;APP&amp;lt;/user&amp;gt;
        &amp;lt;password&amp;gt;*&amp;lt;/password&amp;gt;
    &amp;lt;/jdbc&amp;gt;

    &amp;lt;generator&amp;gt;
        &amp;lt;name&amp;gt;org.jooq.util.DefaultGenerator&amp;lt;/name&amp;gt;

        &amp;lt;database&amp;gt;
            &amp;lt;name&amp;gt;org.jooq.util.derby.DerbyDatabase&amp;lt;/name&amp;gt;
            &amp;lt;inputSchema&amp;gt;APP&amp;lt;/inputSchema&amp;gt;
            &amp;lt;includes&amp;gt;.*&amp;lt;/includes&amp;gt;
        &amp;lt;/database&amp;gt;

        &amp;lt;generate&amp;gt;
            &amp;lt;relations&amp;gt;true&amp;lt;/relations&amp;gt;
            &amp;lt;deprecated&amp;gt;false&amp;lt;/deprecated&amp;gt;
            &amp;lt;generateAnnotation&amp;gt;true&amp;lt;/generateAnnotation&amp;gt;
            &amp;lt;records&amp;gt;true&amp;lt;/records&amp;gt;
            &amp;lt;immutablePojos&amp;gt;true&amp;lt;/immutablePojos&amp;gt;
            &amp;lt;globalObjectReferences&amp;gt;true&amp;lt;/globalObjectReferences&amp;gt;
            &amp;lt;fluentSetters&amp;gt;false&amp;lt;/fluentSetters&amp;gt;
        &amp;lt;/generate&amp;gt;

        &amp;lt;target&amp;gt;
            &amp;lt;packageName&amp;gt;jooq.pento.db&amp;lt;/packageName&amp;gt;
            &amp;lt;directory&amp;gt;C:/Users/tj/Google Drive/IT-Projects/PentoPay/src/main/java&amp;lt;/directory&amp;gt;
        &amp;lt;/target&amp;gt;
    &amp;lt;/generator&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;/pre&gt;

Some very nice utility classes to manage AutoCloseable and some fancy resource management (take back the jdbc connection to the pool post request).
The code below allows automatically call close on an AutoCloseable

&lt;pre class=&quot;prettyprint&quot;&gt;
  def using[T &lt;: AutoCloseable, R](resource: T)(block: T =&gt; R): R = {
    try {
      block(resource)
    } finally {
      if (resource != null) resource.close()
    }
  }
&lt;/pre&gt;

The one below deals specifically with jOOQ DSL Context:

&lt;pre class=&quot;prettyprint&quot;&gt;
  override def withSession[R](block: (DSLContext) =&gt; R): Option[R] = {
    import org.pento.utils.PentoUtils.using
    using(ds.getConnection) {connection =&gt;
      try {
        Some(block(DSL.using(connection, sqlDialect, jooqSettings)))
      } catch  {
        case t: Throwable =&gt; None
      }
    }
  } // withSession
&lt;/pre&gt;

All in one, how to do a simple query. This is quite neat.

&lt;pre class=&quot;prettyprint&quot;&gt;
package org.pento.db

import com.google.inject.Inject
import com.zaxxer.hikari.HikariDataSource
import jooq.pento.db.tables.records.LastaccessRecord
import org.jooq.conf.Settings
import org.jooq.impl.DSL
import org.jooq.{DSLContext, SQLDialect}
import org.pento.utils.LastAccess

trait DataSource {
  def withSession[R](block: DSLContext =&gt; R): Option[R]
}

class DataSourceImpl @Inject() () extends DataSource {
  val ds = {
    val hds = new HikariDataSource()
    hds.setDriverClassName(&quot;&quot;)
    hds.setJdbcUrl(&quot;&quot;)
    hds.setUsername(&quot;&quot;)
    hds.setPassword(&quot;&quot;)
    hds
  }
  val sqlDialect = SQLDialect.valueOf(&quot;DERBY&quot;)
  val jooqSettings = new Settings()

  override def withSession[R](block: (DSLContext) =&gt; R): Option[R] = {
    import org.pento.utils.PentoUtils.using
    using(ds.getConnection) {connection =&gt;
      try {
        Some(block(DSL.using(connection, sqlDialect, jooqSettings)))
      } catch  {
        case t: Throwable =&gt; None
      }
    }
  } // withSession
}

trait DB {
  def allAccesses: Option[List[LastAccess]]
}

class DBImpl @Inject() (val ds: DataSource) extends DB {
  override def allAccesses: Option[List[LastAccess]] = {
    import jooq.pento.db.tables.Lastaccess.LASTACCESS

    import scala.collection.JavaConversions._

    ds.withSession{ctx =&gt; {
      val rs = ctx.select(LASTACCESS.TS)
                  .from(LASTACCESS)
                  .fetchInto(classOf[LastaccessRecord])
      (for{r &lt;- rs} yield LastAccess(r.value1())).toList
    }}
  }
}
&lt;/pre&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oogifu.blogspot.com/feeds/3753954613198778160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1436098877388372574/3753954613198778160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3753954613198778160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1436098877388372574/posts/default/3753954613198778160'/><link rel='alternate' type='text/html' href='http://oogifu.blogspot.com/2016/05/scala-maven-jooq-scalatra.html' title='Scala, Maven, jOOQ, Scalatra'/><author><name>Tango Juliet</name><uri>http://www.blogger.com/profile/13490879613902305035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>