My Hive Posts

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

    Citi Bank India Stopped Usage of Cards for Purchase of Crypto Currencies

    February 13, 2018
    citi-bank-india-stopped-usage-of-cards-for-purchase-of-crypto-currencies

    Today I got a mail from Citi Bank saying that because of potential economic, financial, operational, legal, customer protection and security related risks asscoiated with Bitcoins and cryptocurrencies , Citi Bank has decided to not permit usage of credit and debit cards towards purchase of cryptos. Now let me ask you a question how come using debit or credit cards for purchasing cryptos is a risk for economic. Financially people will become sound because it is one way of investment, I don't think it as a financial risk. They say legal risks, according to RBI there is no such notice to stop purchasing bitcoins or cryptocurrencies to it should not be legal. They talk about Customer Protection, are we really protected as you are the ones who give our details to credit card department and they call us numerous times in a day. ![Screenshot_20180213-195936_2.png](https://steemitimages.com/DQmeT83JiEzFYnnRQ4VaS5KyhUiAUb87hRtrwNNZA5d4d2G/Screenshot_20180213-195936_2.png) Your thoughts on this?

    ColorChallenge - Tuesday Orange - An Art

    February 13, 2018
    colorchallenge-tuesday-orange-an-art

    I went to an art exhibition recently and one of those art was a number of apples placed beside each other where one of the apple was half eaten. ![IMG_20180210_151138.jpg](https://steemitimages.com/DQmaTykrt1qWn3PQGSQvokx8kidsGDBw7Shmhgs4JykCFSY/IMG_20180210_151138.jpg)

    [GoldenHourPhotography] Rays from Sun through the cloud

    February 12, 2018
    goldenhourphotography-rays-from-sun-through-the-cloud

    Today was one of those days where you get to see nature's beauty. It was an evening time where the clouds opened their door so that earth gets to see the Sun. It looks like Sun is giving blessings to Earth because of its loving nature. ![IMG_20180209_154810.jpg](https://steemitimages.com/DQmXYEjXwZn2Uck6YGXRyZJ6j6R2w5eTPvwuPTKcxvSg7cJ/IMG_20180209_154810.jpg) ![IMG_20180209_154718.jpg](https://steemitimages.com/DQmYtdJCCnd3UzuNDnpsPrAhVYBcA3FVho84b4xNGXMTALw/IMG_20180209_154718.jpg) Camera : Nokia 6

    Getting Started With Gatsby.js - Part 3

    February 11, 2018
    getting-started-with-gatsby-js-part-3

    In this tutorial you will be Learning - Getting Data in Gatsby - GraphQl #### Requirements - Node.js and NPM installed on your System - Know basics of HTML, CSS and JavaScript, though not mandatory #### Difficulty - Intermediate #### Tutorial Contents We all know a website is made up of a lot of components and in that Data is one of the important component. Just think about Utopian.io without any posts, would it attract users, no it will not. So to make people come and enjoy any website by reading or doing something you need Data and this tutorial is about getting Data into Gatsby Site. Now we talked about Data, what exactly is data. If I talked about Utopian.io, whatever posts we write are data because it is outside the Code base of Utopian thus its called a Data similarly whatever is outside of Gatsby Component are data. We will be bringing the data from outside and show it from the component whenever we need it. Data can be anywhere a file, database, through the API or even from the Wordpress. Gatsby uses GraphQL to pull data from outside to the components. According to [GraphQL.org](GraphQL.org) >GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. In this tutorial we will be building a page which looks like below which gives the details about the Utopian Moderators. Now since the data is outside of React Components we need to have some mechanism of getting it. ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518337501/v6eko6ru98ugrrtthuim.png) We will be using a simple File System where all my moderator JSON response is kept. So to do that we have to install `gatsby-source-filesystem` and `gatsby-transformer-json` and then change the gatsby-config.js as below : ``` module.exports = { siteMetadata: { title: 'Utopian Moderator', }, plugins: ['gatsby-plugin-react-helmet', 'gatsby-transformer-json', 'gatsby-plugin-glamor', { resolve: 'gatsby-source-filesystem', options: { name: 'src', path: 'Path of your file', }, }, ], }; ``` Now once done we have to write your GraphQL query. Whenever you start your Gatsby site you might have seen something like below where its written that GraphiQL is an in-browser IDE to explore site's data and schema which can be seen at http://localhost:8000/___graphql. ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518337774/gcadxvumwbgq7rtfol9i.png) When you head over to the http://localhost:8000/___graphql you will see something like below where left hand side you will be writing the query and right hand side will give you the result of the query. ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518338197/crjponjttexrspgcejuq.png) Since we already got teh data from Utopian API we will be writing the query as below where allSrcJson is the root entity and then we have edges and node. Inside node we get all the results of the moderators. ``` { allSrcJson { totalCount edges { node { total results { account total_paid_rewards should_receive_rewards total_moderated percentage_total_rewards_moderators supermoderator referrer } } } } } ``` which gives the result as ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518338634/yh2plh6tnvsowfomgtdb.png) Now once we get the GraphQL query, now its time to create the page which we have shown earlier. So to include the query in your Gatsby we just have to write our query inside IndexQuery with graphql tag. This graphql tag is provided by the Gatsby where in Gatsby Build Process the queries are parsed before using. We are also using the result in our component as `data.allSrcJson.edges.map` why because nodes is an array of objects where we need to get an object from the entire lists. Since in our case we have defined total moderators inside the node itself we can get that value using `node.total`. No again the results is an array of objects so we need to map that too and get the values out of it. ``` import React from "react" export default ({ data }) =>

    Utopian Moderator

    {data.allSrcJson.edges.map(({ node }) => (

    Total Modeartors : {node.total}

    {node.results.map(obj => { if (obj) { var value = Number(obj.percentage_total_rewards_moderators).toFixed(2); return

    {obj.account} Moderator modearted {obj.total_moderated} posts who has Moderation Percentage of {value}% out of 100%

    } else return null })}
    ))}
    export const query = graphql` query IndexQuery { allSrcJson { totalCount edges { node { total results { account total_paid_rewards should_receive_rewards total_moderated percentage_total_rewards_moderators supermoderator referrer } } } } } `; ``` #### 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)

    Posted on Utopian.io - Rewarding Open Source Contributors

    B&W Photo Contest - Urban Motion - Multiple Entries

    February 09, 2018
    b-and-w-photo-contest-urban-motion-multiple-entries

    This is my multiple entries for the B&W Photo Contest, ran by @daveks and judged by @sulev. This week theme is Urban Motion which means "encapsulates people, objects, cityscapes, or the surreal in Motion." ### Entry 1 : London Eye ![WP_20150312_09_23_53_Pro.jpg](https://steemitimages.com/DQmXt3cUEPsAVtxJzFzzNsnJvz9qjHYTFcdrVn1NfSdwubt/WP_20150312_09_23_53_Pro.jpg) ### Entry 2 : View From Aeroplane ![WP_20150310_12_18_36_Pro.jpg](https://steemitimages.com/DQmYdFkD2QseW2ahTteSZdzQLzJX6uMpcpGDxaD5eq9JviK/WP_20150310_12_18_36_Pro.jpg) ### Entry 3 : Dubai Mall ![IMG-20160213-WA0036.jpg](https://steemitimages.com/DQmUQsoytAuhV4JwLEXehrt7AaHGr4JxDZ2GBqqeLHjYVCP/IMG-20160213-WA0036.jpg) Camera : Nokia 6

    DiscordSpamRemoval v1.1 - Removing Duplicate Links from Discord Channel

    February 08, 2018
    discordspamremoval-v1-1-removing-duplicate-links-from-discord-channel

    This is an Update for Removing Duplicate Links from Discord Channel. ### New Features - Reconnect - If the Bot disconnected because of Discord WebSocket issue, the bot was not reconnecting on its own. So I have added an option of reconnection whenever it disconnected. Commits : https://github.com/codingdefined/DiscordSpamRemoval/commit/5a8056b710bcb1b3785041196a122e6e2454957c and https://github.com/codingdefined/DiscordSpamRemoval/commit/4fdd5e3c346b9db8dd50460b8c9da4ac9fb95774 - Was using only Steemit and Busy link previously, now made it generic where if you post any link it will not allow if its duplicate and changed the time period from 2 to 12 hours. Commit : https://github.com/codingdefined/DiscordSpamRemoval/commit/5a8056b710bcb1b3785041196a122e6e2454957c - $last option - I have also added an option so that people can check when they have last posted using $last ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518068798/xqgaxfclhg3uvg5kbrub.png) Commit: https://github.com/codingdefined/DiscordSpamRemoval/commit/104eb37d76f0a12dcc163224be03cd3e6db57a60 - Requirements to Add multiple links in different channel - There was a requirement that I can post the same link in two different channels, two different links in same channel, two different links in two different channels and a link can be posted max twice in the server across all the channels. ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1518069080/dgdxtju0uknxq16dvqpq.png) Commit : https://github.com/codingdefined/DiscordSpamRemoval/commit/b6f0bd0a5016279c22356a5083d2a01b43be59ac First Version : https://utopian.io/utopian-io/@codingdefined/removing-duplicate-and-too-frequent-steemit-and-busy-link-from-discord


    Posted on Utopian.io - Rewarding Open Source Contributors

    ColorChallenge - Tuesday Orange - Sunset

    February 06, 2018
    2alm1b-colorchallenge-tuesday-orange-sunset

    This image was taken in Udaipur, Rajasthan, India minutes before the sunset. The scenic beauty is truly amazing as you have lake and mountains with the Sunset. ![IMG_20170303_181630571.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1517921372/afsizvneznwerb05nron.jpg) ### Camera : Nokia 6

    Beautiful Sunday Trip to Truffles

    February 04, 2018
    beautiful-sunday-trip-to-truffles

    So today I visited Truffles also known as Ice and Spice Cafe which is located in Koramangala. They do have a lot of branches in Bangalore, but I liked this one a lot. Every day you will see this cafe to be fully occupied and you do not get seat for 15-20 minutes, this time may increase in holidays. Luckily today I got seat in 5 minutes. Here the famous food is Burger, most of the people only order Burger and some cake. They have around 10 types of Veg Burgers(I do not check Non Veg section as I am a vegetarian). ![IMG_20180126_181414.jpg](https://steemitimages.com/DQmXZU5pYc88nzY62Wchm9sCPRpjxL9pvcWuZFfPzkNZkN6/IMG_20180126_181414.jpg) ![IMG_20180126_181447.jpg](https://steemitimages.com/DQmThFMjLCjtBZkcZDT9Y5gjpAXEwsNMAQvWsQ9yKKEbjj6/IMG_20180126_181447.jpg) ![IMG_20180126_180339.jpg](https://steemitimages.com/DQmauQpSSsqVbVXsojhMGUqzw1Udor5wU149yprF5aRvgSK/IMG_20180126_180339.jpg) ![IMG_20180126_180206.jpg](https://steemitimages.com/DQmckEzpgbXEHnMkw39pUEuyXv4YXuh3aDPwDjQZhx9shQ9/IMG_20180126_180206.jpg) ![IMG_20180126_180227.jpg](https://steemitimages.com/DQmRzVFqHnwQCPkYufw7QB4r8fnMjBbeFyQ3xG7Xg4X4fPW/IMG_20180126_180227.jpg) ![IMG_20180126_181334.jpg](https://steemitimages.com/DQma1hKsiVxBXE7868FuwFztMZVg1awV57obM7iyGGzauwh/IMG_20180126_181334.jpg) ![IMG_20180126_181400.jpg](https://steemitimages.com/DQmUVHaRowS1SxpHWCELguWt8AtGowNFX1ySfSmbZQnn1qc/IMG_20180126_181400.jpg)

    B&W Photo Contest #2 - Reflections - Reflection of a Bulb

    February 02, 2018
    b-and-w-photo-contest-2-reflections-reflection-of-a-bulb

    This is my 2nd entry for the B&W Photo Contest, ran by @daveks and judged by @otage. ![IMG_20180118_194813_2.jpg](https://steemitimages.com/DQmfRnp7JpMeafdSxJUCy2BPiB8KWFrCAp63avhAaLVWHFf/IMG_20180118_194813_2.jpg) ### Camera : Nokia 6, Edited to B&W

    Photography of Flowers

    February 01, 2018
    photography-of-flowers

    Some of the beautiful flowers photo which I captured today with my Nokia 6 Smartphone. The images were taken in a nearby park and please don't ask me the name of the flower as I don't know even the name of one. If you know the name of the flowers please do comment. ![IMG_20171126_093235.jpg](https://steemitimages.com/DQmYryaosqAcAuZxkx7in3MsofrkRPyC9JPjwCjZnqToYh6/IMG_20171126_093235.jpg) ![IMG_20171126_093310.jpg](https://steemitimages.com/DQmW2ypNaVVvcgprmdz2FwLrxzXMd2QAsgquRywYGHvht8k/IMG_20171126_093310.jpg) ![IMG_20171126_093255.jpg](https://steemitimages.com/DQmVvqJzLZZYAYGPbTZXFrBG62MiRduvJFmfVqyLMM2t66S/IMG_20171126_093255.jpg) ![IMG_20171126_093240.jpg](https://steemitimages.com/DQmXMckjvaKExxN383tVX2QCnkTEtVi4uWaEBXTirz24xVk/IMG_20171126_093240.jpg) ![IMG_20171126_093641.jpg](https://steemitimages.com/DQmXzkeZ7NLoe31W41eGdiUjRreGRxdtb6CswEth6RqdnRp/IMG_20171126_093641.jpg)