My Hive Posts

    Written by Coding Defined who lives and works in India building useful things. You should follow him on Twitter

    ColorChallenge - Friday Blue - Open Aquarium in Dubai Mall

    March 09, 2018
    colorchallenge-friday-blue-open-aquarium-in-dubai-mall

    Dubai Aquarium is one of the largest Aquariums in the World and itis located in Dubai Mall. If you do not want to go inside you can get a glimpse of it from the outside. ![IMG-20160213-WA0050.jpg](https://steemitimages.com/DQmPGUrpeSrT7YKaqVyV52svzAzxCiwM6HJT4KTVgw58Ly7/IMG-20160213-WA0050.jpg) ![IMG-20160213-WA0051.jpg](https://steemitimages.com/DQmePM1yVJXbDrns2bwZuuMtYcs1dSGH2MHKgnfbTLAJ6mL/IMG-20160213-WA0051.jpg)

    Use Bid Bot Intelligently

    March 08, 2018
    use-bid-bot-intelligently

    See the below image people have send the bid to the bot even though it's giving -50% ROI. Why would you do that? When in doubt always use https://steembottracker.com/, and then check what is the ROI Limit of any bot before sending the money. Most of them does not give any details about it then there are Bots which has a capped value of 10% or 15% ROI, so that Bid Bot will not receive any bids if the ROI goes below that threshhold. ![BotTracker.png](https://steemitimages.com/DQmcWkVbwFM4HSYirgBiuMTnRPbN9scHn4yy8mKXt6NnQD5/BotTracker.png) # Use BidBot Intelligently, Check ROI before investment

    Quality Slider Bug in Utopian

    March 08, 2018
    quality-slider-bug-in-utopian

    #### Expected behavior When the Quality Slider is at 0%, the Moderator should not be allowed to click "Yes,Verify" or should be given a warning saying that "Please Set the Quality Slider". If I need to set 0 as a quality slider I do not have to move the slider and bring it back to 0. #### Actual behavior On Initial Load when you have not clicked on Quality Slider, I get a warning saying "Please Set the Quality Slider", so after moving the quality slider and bringing it back to 0% does not give me the warning. #### How to reproduce - Moderators click on Verify Button - Fill all the questionnaire except Quality Slider - Click on "Yes, Verify", you will get a warning "Please Set the Quality Slider". - Move the slider and bring it back to 0, and click on "Yes, Verify". * Browser: Chrome * Operating system: Windows 10 #### Recording Of The Bug


    Posted on Utopian.io - Rewarding Open Source Contributors

    5 Small changes today can help you to live a better life

    March 07, 2018
    5-small-changes-today-can-help-you-to-live-a-better-life

    We all desired to live a better and healthy life. Healthy not only means that you should have a physique like a bodybuilder or you should have a six-pack. Healthy means that you are happy both physically and mentally. Mentally happy means that you have a positive attitude on any aspects of your life because that can give you the power to cope up with that situation whereas physical happiness means that you are happy with the way you are and will not think what others think about you but you. Now coming back to the topic how 5 small changes I try to make in my life to live a better life. 1. Wake up early and have a morning walk - From this month I have started waking up at 6 AM which was previously 8 AM which gives me enough time to have 1 hour of walking. One thing I noticed by going for a morning walk is that your perspective on life changes drastically. You get a positive energy which helps you to overcome the present scenario you are in. 2. Try to eat more Home Cooked Meal - We all love to eat out and try all the new restaurants nearby but that not only helps you to gain weight but also empties your pocket. I am also a foodie but still, I started to have 1 or 2 meal a day at home which is helping me big time. 3. Spend more on healthy food than the expensive clothes - I rarely eat fruits thinking it to be an expensive item in our daily life, but as a famous saying "An Apple a day keeps the doctor away" is apt at any given day. You need to have as much fiber or healthy elements in your daily food habits thus started to change my perspective to eat fruits more. 4. Read at least 30 minutes - Read motivational articles or good books every day (not only trending posts in Steemit) for at least 30 minutes which changes your perspective of seeing the world. 5. Have a passion - So recently I have started a passion for clicking photos, a little photographer in me. I can tell you that I love taking photos not only because nature or world is beautiful but that helps me to change my focus to something I like. How much time you dedicate yourself in a day, not even 5 minutes. But keeping a passion gives you a "me" time which we all need it.

    TrueUSD started trading in Bittrex, is it the end of Tether?

    March 06, 2018
    trueusd-started-trading-in-bittrex-is-it-the-end-of-tether

    So today TrueUSD started trading in Bittrex which is claimed to be a price stable cryptocurrency which means each 1 TrueUSD will be redeemable for 1 US Dollar. ![](https://steemitimages.com/DQmPfF1YRPYR4v4ucpr3Axkzf31Cx6EwmtiMoyLy1vyetfK/image.png) To withdraw TUSD to USD you need to send the TUSD to an escrow agents or trust agents who will wire the USD to your account and the TrueUSD coins are burned. Below is the image taken from TrueUSD website. ![](https://steemitimages.com/DQmVCuCt8YgNqfYbVZ4BYC6tCcQQd7An2tekU7siPPAqDhL/image.png) PC : https://www.trueusd.com/ Since TrueUSD has started trading, does it mark as the end of Tether. Thoughts?

    Clear Cache Extension to clear the Cache

    March 05, 2018
    clear-cache-extension-to-clear-the-cache

    Browser Cache is a memory in your system which holds the data of your recent web pages. So sometimes you might have heard people say that please clear the cache, what does that mean is to remove that memory so that fresh web pages would be downloaded from the web. For Example, you are working on some web page and that web page was edited recently, you might not get the latest changes until you clear the cache. One importance of using the Cache is that browse loads that page too quickly as it stores some data and does not have to download all over again. To remove the cache you need to go to Browser settings and do it every time, this is actually a headache for a Front End developers because it wastes so much time. Instead of going there I use simple chrome extension called Clear Cache, which clears the cache for me on one click. ![](https://steemitimages.com/DQmYDZVSY6oFHZotGxFpNL6AJcMk59CvRvntHjghHNtBPPG/image.png) It saves a lot of time and you will see near real time web pages and not cache pages. This plugin ask you what data you want to remove, so be careful with that I mainly use Cache and App Cache because if you check all the boxes it will remove all the history and passwords which you might have saved in the browser. ![](https://steemitimages.com/DQmTH9BJnsda7ufgTtB23vkGdTBtMnTAL6Rwu8jWpbGX9i6/image.png)

    Beautiful Sunday - Cold Coffee at Starbucks to beat the Summer

    March 04, 2018
    beautiful-sunday-cold-coffee-at-starbucks-to-beat-the-summer

    So summer has started in India and to beat the summer you need to find a way to cool yourself either from inside or from outside. So that's why I visited one of the best coffee shops at least in Bangalore that is Starbucks Coffee. I have never visited to starbucks before, so it was my first experience though I have heard a lot about it saying it is one of the best coffee maker. The ambience of the store looks great with lighting and all. ![IMG_20180225_173025.jpg](https://steemitimages.com/DQmXC5wjFNTWxLi21S1GaaZgGUs52vk4UKdFKoLhJ5t5qtr/IMG_20180225_173025.jpg) One thing I noticed and I failed to understand that why you need a smartphone when you can just chat face to face. Are the healthy conversation just remain only through online messages and no one wants to talk to anyone directly. As I was sitting in one corner I saw two sets of people one who is actively engaging in conversations whereas others who was busy in phones. ![IMG_20180225_172419.jpg](https://steemitimages.com/DQmQsjE9g6PwB2LwqhsvtVicAmoMUmnntzUkTXhNVn78EZg/IMG_20180225_172419.jpg) We have ordered the latest arrivals in Cold Coffee which is Calamel with Chocolate Icecream Cold Coffee, yeah I know the name seems mouth watering so does the coffee. We have to wait for like 20 minutes for our coffee to arrive, but the wait was worth it. And the mandatory Starbucks coffee glass photo :P ![IMG_20180225_172745.jpg](https://steemitimages.com/DQmTagkYH9qf4R1CLi8BrVyx69bJ2jRFNM7jKqhPH7TZbtx/IMG_20180225_172745.jpg) The coffee looks mouth watering and yummy with so many flavors in it. And it's correct though, you will love Starbucks coffee. ![IMG_20180225_170554.jpg](https://steemitimages.com/DQmP7K6c3FPaaBobf9jjP6nv1sGSQ1DJJ9ZcoJSKxK1KtW6/IMG_20180225_170554.jpg)

    Happy Holi to All

    March 03, 2018
    happy-holi-to-all

    Holi is a Hindu Festival mainly celebrated in India, is a festival of Color, Togetherness, Peace, Harmony, Friendship etc. Mainly it is a festival of victory of good over evil. In the occasion of Holi we had a small party in our office with drinks and snacks. ### Few Beers ![IMG_20180302_173008.jpg](https://steemitimages.com/DQma81yuRyRGHy2TMJjEK4WRg4RwHH21Fjm2tJS62LZZSLh/IMG_20180302_173008.jpg) ### Glasses for Whisky ![IMG_20180302_173017.jpg](https://steemitimages.com/DQmP5rdv59aqfu39yCjT2wxZo7SgnJJPFzoE8xWwA1Ry9zi/IMG_20180302_173017.jpg) ### Kachori ![IMG_20180302_173512.jpg](https://steemitimages.com/DQmaMMAEhyDDHwufZ1rFbp6wj5uxuy8w5ZD6u7rNs2TE9Ps/IMG_20180302_173512.jpg) ### Sweet ![IMG_20180302_173449.jpg](https://steemitimages.com/DQmZxLh8QKQJtMp6d5XotC8Uu3QVfymacN5jtVRiri6hhKU/IMG_20180302_173449.jpg)

    ColorChallenge - Thursday Green - Papers

    March 01, 2018
    colorchallenge-thursday-green-papers-0f7fe48e897aa

    Today's image for Thursday Green Color Challenge is different than the usual ones. The below image is taken Of papers which are of equal sizes. ![image](https://img.esteem.ws/70dfuwi23n.jpg) ### 📷 Camera : Nokia 6

    Getting Started With Gatsby.js - Part 4

    March 01, 2018
    getting-started-with-gatsby-js-part-4

    ### In this tutorial, you will be Learning - How to create Gatsby Source Plugin - How to Use that Plugin in Your Application ### Requirements Node.js and NPM installed on your System Know basics of HTML, CSS and JavaScript, though not mandatory ### Difficulty Intermediate ### Tutorial Contents ##### How to create Gatsby Source Plugin Gatsby's Source plugins are the medium where you can get the data from the remote location (i.e. through the API) or from your local system (i.e. file system). Gatsby Source Plugin is very similar to an NPM package where you need to publish that in NPM. Likewise we will have a package.json file which will have the information about your Plugin along with the dependencies. For Example a typical package.json looks like below where you have the name, version, description, scripts if any, author, license and the dependencies. The dependencies are nothing but all the details of the packages I am using for this Plugin. ``` { "name": "gatsby-source-myplugin", "version": "0.0.1", "description": "My Source Plugin", "main": "gatsby-node.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Coding Defined (http://www.codingdefined.com)", "license": "MIT", "dependencies": { "utopian-api": "^0.4.1" } } ``` As you can see above I main file as gatsby-node.js where all teh code for this plugin will be going. Here we will have two main Nodes a. sourceNodes, b. createNode 1 - You will be exporting the sourceNodes, so that any Gatsby app calling your plugin can consume it. So your gatsby-node.js will start with something like below. ``` exports.sourceNodes = async ({ boundActionCreators }) => { return; }; ``` 2 - Now the createNode is used to create a new node which will have below properties - id - The id of the node - parent - The id of the parent node - children - Its an array which contains id of all teh children node - internal - Internal is an object where we have mediaType, type, content, and contentDigest. MediaType gives a sense to the transformer plugin (if used) that the content can be transformed or not. Type is used to query all the posts for the plugin in GraphQL. Content is the content of the node and contentDigest is the digest for the content. So since we know about sourceNodes and createNode it will be dead simple to create your Gatsby Source Plugin. Lets create a single node first, for example if I get a post which has id and the content, what I am going to do is to write a createNode function and add parent, children, internal to it as shown below. ``` createNode({ ...post, id: `${post.id}`, parent: "root", children: [], internal: { type: 'MyPost', content: nodeStr, contentDigest: nodeHash, }, }); ``` The "post" in teh first line is the full post, id is the id of the post. Since I do not need any parent for this post I will assign "root", children also is empty. The type of the post is "MyPost" that means if I use GraphiQL I can use it as AllMyPost to get all the nodes. Now content is the post itself, for that I first stringify the post as shown below, and assign the nodeStr to the content. `const nodeStr = JSON.stringify(post);` Next is to specify the digest for the content using contentDigest. For that first we have to have crypto in your file using `const crypto = require('crypto');`. Next we will be creating a md5 hash and then update the nodeStr (i.e. the stringify post of ours) with it and then create a digest in hex as shown below ``` const nodeHash = crypto .createHash('md5') .update(nodeStr) .digest('hex'); ``` Lets say we get 10 posts as an array of object so we will be going through it one by one and then creating the node for each one of them as shown below ``` posts.forEach(post => { const nodeStr = JSON.stringify(post); const nodeHash = crypto .createHash('md5') .update(nodeStr) .digest('hex'); createNode({ ...post, id: `${post.id}`, parent: "root", children: [], internal: { type: 'MyPost', content: nodeStr, contentDigest: nodeHash, }, }); }); ``` Now the full code should be inside our sourceNodes, thus our full code looks like below ``` const crypto = require('crypto'); exports.sourceNodes = async ({ boundActionCreators }) => { const { createNode } = boundActionCreators; return posts.forEach(post => { const nodeStr = JSON.stringify(post); const nodeHash = crypto .createHash('md5') .update(nodeStr) .digest('hex'); createNode({ ...post, id: `${post.id}`, parent: "root", children: [], internal: { type: 'MyPost', content: nodeStr, contentDigest: nodeHash, }, }); }); }; ``` ##### How to Use that Plugin in Your Application At first we need to add our newly constructed plugin in the gatsby-config.js file as shown below ``` module.exports = { plugins: [{resolve: 'gatsby-source-myplugin'}], }; ``` And then to get the data to our app, we need to add a qraphQl query as shown bwlow ``` export const query = graphql` query IndexQuery { allMyPost { edges { node { id } } } } `; ``` And next is to use it, where we are iterating over the data and get the id of the node ``` {data.allMyPost.edges.map(({ node }) => (

    {node.id}
    ))} ``` ### Curriculum - [Getting Started With Gatsby.js - Part 1](https://utopian.io/utopian-io/@codingdefined/getting-started-with-gatsby-js-part-1) - [Getting Started With Gatsby.js - Part 2](https://utopian.io/utopian-io/@codingdefined/getting-started-with-gatsby-js-part-2) - [Getting Started With Gatsby.js - Part 3](https://steemit.com/utopian-io/@codingdefined/getting-started-with-gatsby-js-part-3)

    Posted on Utopian.io - Rewarding Open Source Contributors