<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Keith Holliday on Medium]]></title>
        <description><![CDATA[Stories by Keith Holliday on Medium]]></description>
        <link>https://medium.com/@keithholliday?source=rss-94ac629272d1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*E_TU-_rIHDEA2fNO5pUvPg.jpeg</url>
            <title>Stories by Keith Holliday on Medium</title>
            <link>https://medium.com/@keithholliday?source=rss-94ac629272d1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 04:17:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keithholliday/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating Your First Slack Bot in Nodejs | Koala Tea Blog on WordPress.com]]></title>
            <link>https://medium.com/koala-tea/creating-your-first-slack-bot-in-nodejs-koala-tea-blog-on-wordpress-com-c624315c0987?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c624315c0987</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[slack]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Sat, 14 Apr 2018 17:56:55 GMT</pubDate>
            <atom:updated>2018-04-14T17:56:55.950Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are looking for a good introduction to the world of AI or are simply wanting to be trendy and cool, Chat Bots are the answer. In this post, I’ll get you started with a quick chat bot in Nodejs.</p><h3>Getting Permissions</h3><p>First, we will need to let Slack know about our bot and grab an API key.</p><ol><li>Go to this URL: <a href="https://my.slack.com/services/new/bot">https://my.slack.com/services/new/bot</a></li><li>Enter a username for your bot. We will call this one, testbot</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/0*c3KMo7004ylq3STL." /></figure><p>3. Scroll down to Integration Settings and grab the API key. I’ve deleted the one below 😛</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/0*Nvo68KjEfIepDHSz." /></figure><h3>Creating the Nodejs Bot</h3><p>Alright, now that we have our creds, let’s create a bot.</p><p>First, create a new directory, initialize a project and install the slackbots library.</p><pre>mkdir my-first-bot <br>cd my-first-bot <br>npm init -y <br>npm install slackbots --save <br>touch index.js</pre><p>Alright! So now, let’s initialize the bot using the API key from above. In the ​index.js add the following.</p><pre>const SlackBot = require(&#39;slackbots&#39;);<br>const bot = new SlackBot({<br>    token: &#39;xoxb-346962835285-DOgbKAsXuvn5tTYOrlUOyJYB&#39;, <br>    name: &#39;My Bot&#39;<br>});</pre><p>Sweet, now let’s create an on start message to let everyone know we are connected.</p><pre>bot.on(&#39;start&#39;, () =&gt; {<br>    bot.postMessageToChannel(&#39;general&#39;, &#39;Hello!&#39;);<br>});</pre><p>The above will post a hello message in the general channel when the bot has connected. One last thing we shoul do for this tutorial is respond to users. Let’s start by adding the on message event.</p><pre>bot.on(&#39;message&#39;, (data) =&gt; {<br>    console.log(data);<br>});</pre><p>Next, we will check if the user is messaging our bot and then reply to them if so.</p><pre>bot.on(&#39;message&#39;, (data) =&gt; {<br>    if (msg.username === &#39;My Bot&#39;) {<br>       bot.postMessage(data.channel, &#39;Yo!);<br>    }<br>});</pre><p>The above checks if the username of the message is to our bot and sends a reply to the user in the same channel.</p><p>And that’s all for this tutorial! I’ve been making quite a few bots lately, so I’ll be posting more about how to create bots and the different feature you can use. Let me know if you have any questions.</p><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/04/14/creating-your-first-slack-bot-in-nodejs/"><em>blog.koalatea.io</em></a><em> on April 14, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c624315c0987" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/creating-your-first-slack-bot-in-nodejs-koala-tea-blog-on-wordpress-com-c624315c0987">Creating Your First Slack Bot in Nodejs | Koala Tea Blog on WordPress.com</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Package Management with Pipenv]]></title>
            <link>https://medium.com/koala-tea/python-package-management-with-pipenv-koala-tea-blog-on-wordpress-com-9f5e5e2763ed?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f5e5e2763ed</guid>
            <category><![CDATA[pipenv]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[package-management]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Fri, 13 Apr 2018 03:25:08 GMT</pubDate>
            <atom:updated>2018-04-14T17:58:59.486Z</atom:updated>
            <content:encoded><![CDATA[<p>I started developing web apps with PHP and Nodejs where we have composer and npm respectively to manager packages. Every time I return to program in python, I realize the need to set up a virtual enviroment to manage project dependencies. Luckly, we now have <a href="https://github.com/pypa/pipenv">Pipenv</a> to save us from this pain. 😀 Below I’ll show the basic flow for working with Pipenv.</p><h3>Install Pipenv</h3><p>Let’s start by isntalling pipenv. If you are a Python developer, you are probably familiar with pip. So install pipenv with the following</p><pre>pip install pipenv</pre><h3>Hello World</h3><p>Let’s now build a simple application using a library called numpy. Start by creating a new directory:</p><pre>mkidr new-project <br>cd new-project</pre><p>Now, let’s install numpy by using Pipenv</p><pre>pipenv install numpy</pre><p>This will create a virtual env for us, just for our new-project! That’s much easier than managing that ourselves 😀</p><p>Now let’s create a python file to test this out.</p><pre>touch index.py</pre><p>Inside that file add the following</p><pre>import numpy as np <br>a = np.array([1,2,3]) <br>print a</pre><p>Now to run the program we use the following</p><pre>pipenv run python index.py</pre><p>And that’s it! The run command is a little verbose, but it saves us a lot of time overall.</p><p>Let me know if you have any questions and happy coding!</p><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/04/13/python-package-management-with-pipenv/"><em>blog.koalatea.io</em></a><em> on April 13, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f5e5e2763ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/python-package-management-with-pipenv-koala-tea-blog-on-wordpress-com-9f5e5e2763ed">Python Package Management with Pipenv</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project Best Practices: Adding Integration Tests]]></title>
            <link>https://medium.com/koala-tea/project-best-practices-adding-integration-tests-d9e2a9aaacf?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9e2a9aaacf</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Mon, 22 Jan 2018 02:11:50 GMT</pubDate>
            <atom:updated>2018-01-22T02:14:42.638Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, we will get you set up running integration tests with ExpressJS. While I will be using a specific library, you can generalize these methods to meet the app you are using.</p><p>Integration tests will differ from Unit tests in the sense that they treat the app as a block box. For us, we will be testing our API which means sending API calls and checking the returns.</p><h3>Set Up</h3><p>Run the following commands to get a clean project</p><pre>mkdir test-integrations <br>cd test-integrations <br>npm init -y <br>touch index.js <br>mkdir test</pre><h3>Initial Api</h3><p>Now, create our basic API with one route</p><pre>npm install express --save</pre><p>Then in the index.js file</p><pre>const express = require(&#39;express&#39;) <br>const app = express() <br>app.get(&#39;/hello-world&#39;, (req, res) =&gt; { <br>  return res.status(200).send({msg: &#39;Hello World!&#39;}) <br>}) </pre><pre>app.listen(3000, () =&gt; console.log(&#39;Example app listening on port 3000!&#39;)) </pre><pre>module.exports = app;</pre><p>This is basically the hello world example form ExpressJS’s site, but I’ve change the return value to JSON so we can test it as if we were working on a real world API.</p><h3>Creating our test</h3><p>Let’s start by installing our test libraries.</p><pre>npm install mocha chai chai-http --save</pre><ul><li>We will be using chai to do assertions. For example. expect(1 === 1).to.eql(true)</li><li>We will use chai-http to make requests to our API</li><li>And finally, we will use mocha to run our test and organize them</li></ul><p>All of this will make more sense with an example 🙂</p><p>Let’s create a file in our test directory. You can name your file how you’d like, but this is my preferred format.</p><pre>touch test/GET-hello-world.test.js</pre><p>In the above file, let’s add the following to the top of the file</p><pre>// Testing Libraries<br>const chai = require(&#39;chai&#39;);<br>const chaiHttp = require(&#39;chai-http&#39;);</pre><pre>// Api<br>const server = require(&#39;../index&#39;);</pre><pre>// Global to help with code style<br>const expect = chai.expect<br>chai.use(chaiHttp);</pre><p>This will import our testing libraries and our api. We also tell chai to use the http module and create a global expect variable to keep our tests concise.</p><p>Now, add the first test</p><pre>describe(&#39;/GET Triggers&#39;, () =&gt; {<br>  it(&#39;returns hello world&#39;, async () =&gt; {<br>    const response = await chai.request(server).get(&#39;/hello-world&#39;);</pre><pre>    expect(response.status).to.eql(200);<br>    expect(response.body.msg).to.eql(&#39;Hello World!&#39;);<br>  });<br>});</pre><p>Here we use a function called describe which simply organizes our tests into a group. You will see this in the output after we run the test. You can also declare describe sections inside other describes.</p><p>The second function is the it function which defines a specific test. You can see here that we use chai to call a request to our server. Afterword we use the expect global variable to assert our status and body on the response.</p><h3>Create an error test</h3><p>Let’s also create an error test so you can see how that work. We will call an api route that does not exists and check that express returns a 404.</p><p>Inside of the describe function add the following</p><pre>it(&#39;errors route is not found&#39;, async () =&gt; {<br>  try {<br>    await chai.request(server).get(&#39;/fake-url&#39;);<br>  } catch (e) {<br>    expect(e.response.status).to.eql(404);<br>  }<br>});</pre><h3>Conclusion</h3><p>Here is the final result of our code</p><pre>// Testing Libraries<br>const chai = require(&#39;chai&#39;);<br>const chaiHttp = require(&#39;chai-http&#39;);</pre><pre>// Api<br>const server = require(&#39;../index&#39;);</pre><pre>// Global to help with code style<br>const expect = chai.expect<br>chai.use(chaiHttp);</pre><pre>describe(&#39;/GET Triggers&#39;, () =&gt; {<br>  it(&#39;returns hello world&#39;, async () =&gt; {<br>    const response = await chai.request(server).get(&#39;/hello-world&#39;);</pre><pre>    expect(response.status).to.eql(200);<br>    expect(response.body.msg).to.eql(&#39;Hello World!&#39;);<br>  });</pre><pre>it(&#39;errors route is not found&#39;, async () =&gt; {<br>    try {<br>      await chai.request(server).get(&#39;/fake-url&#39;);<br>    } catch (e) {<br>      expect(e.response.status).to.eql(404);<br>    }<br>  });<br>});</pre><p>As you can see, it is easy to get started! Basically you call a request to your api routes, then check the output. There is much more detail we can get into, but we shall cover that in later lessons.</p><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/01/22/project-best-practices-adding-integration-tests/"><em>blog.koalatea.io</em></a><em> on January 22, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9e2a9aaacf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/project-best-practices-adding-integration-tests-d9e2a9aaacf">Project Best Practices: Adding Integration Tests</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project Best Practices: Setting Up ESLint]]></title>
            <link>https://medium.com/koala-tea/project-best-practices-setting-up-eslint-ed195da7bd0c?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed195da7bd0c</guid>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Mon, 15 Jan 2018 04:50:14 GMT</pubDate>
            <atom:updated>2018-01-15T04:51:29.834Z</atom:updated>
            <content:encoded><![CDATA[<p>This is part of a series about NodeJs best practices for your projects. Every project you build will become more maintainable with these practices. They are not everything (we will get there), but they are more than a good start.</p><p>This tutorial goes over setting up ESLint. You can check out the official docs right here: <a href="https://eslint.org/docs/user-guide/getting-started">https://eslint.org/docs/user-guide/getting-started</a>. The docs are pretty straightforward 😀</p><p>Let’s start by creating a new project</p><pre>mkdir eslit-test <br>cd eslint-test <br>npm init -y</pre><p>No we will add eslint</p><pre>npm install eslint --save-dev</pre><p>And initialize it by</p><pre>./node_modules/.bin/eslint --init</pre><p>This will ask you if you want to use a preset ESLint or answer questions about your Javascript uses. I prefer the Standard or AirBnB preset.</p><p>That’s it! Now you can run lint using the command below or by connecting a plugin to your text editor. I use Atom + the Eslint plugin</p><pre>eslint yourfile.js</pre><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/01/15/project-best-practices-setting-up-eslint/"><em>blog.koalatea.io</em></a><em> on January 15, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed195da7bd0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/project-best-practices-setting-up-eslint-ed195da7bd0c">Project Best Practices: Setting Up ESLint</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Node with a Specific Engine Version with Docker Machine]]></title>
            <link>https://medium.com/koala-tea/docker-node-with-a-specific-engine-version-with-docker-machine-d32797ddba69?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d32797ddba69</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-machine]]></category>
            <category><![CDATA[swarm]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Wed, 10 Jan 2018 17:05:48 GMT</pubDate>
            <atom:updated>2018-01-10T17:09:35.706Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently Docker released an update that was a breaking change for my team over at Habitica. This gave me a new perspective that keep your nodes on the same version and only upgrading when needed is something to consider while managing a large swam. This, of course, should have be obvious since we do the same with many NPM packages.. 😛</p><p>There is documentation on how to use specific engine when provision, but you do need to use an external url. I’ll quickly show you how to provision your Docker node with an older version.</p><h3>Checking the Docs</h3><p>If we take a look at the docs: <a href="https://docs.docker.com/machine/reference/create/">https://docs.docker.com/machine/reference/create/</a>, we see an option for specifying and engine install url --engine-install-url. So, you could host your own install url, or you can use one from here: <a href="https://github.com/rancher/install-docker">https://github.com/rancher/install-docker</a>.</p><h3>And the Final Result</h3><pre>docker-machine create \ <br>  --driver virtualbox \ <br>  --engine-install-url &quot;https://releases.rancher.com/install-docker/17.05.sh&quot; \<br>  node-1</pre><h3>A Real Life Example</h3><p>The dev example is nice, but I always like to see what people to in real life. Here is the exact command I used.</p><pre>docker-machine create \ <br>  --engine-install-url &quot;https://releases.rancher.com/install-docker/17.05.sh&quot; \ <br>  --driver azure \ <br>  --azure-subscription-id $AZURE_SUB_ID \ <br>  --azure-size Standard_A4 \ <br>  worker-12</pre><h3>Conclusion</h3><p>Docker definitely thought of the need for locking in versions, but thanks to Rancher, the process is simple. Also, thanks to this comment for showing me Rancher: <a href="https://github.com/docker/machine/issues/1702#issuecomment-314411175">https://github.com/docker/machine/issues/1702#issuecomment-314411175</a></p><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/01/10/docker-node-with-a-specific-engine-version-with-docker-machine/"><em>blog.koalatea.io</em></a><em> on January 10, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d32797ddba69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/docker-node-with-a-specific-engine-version-with-docker-machine-d32797ddba69">Docker Node with a Specific Engine Version with Docker Machine</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing your Ethereum DApp on Rinkeby with Truffle]]></title>
            <link>https://medium.com/koala-tea/testing-your-ethereum-dapp-on-rinkeby-with-truffle-f089ab6c32db?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f089ab6c32db</guid>
            <category><![CDATA[truffle]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Thu, 04 Jan 2018 15:44:53 GMT</pubDate>
            <atom:updated>2018-01-04T16:08:10.332Z</atom:updated>
            <content:encoded><![CDATA[<p>When building your Dapp for Ethereum, you will commonly use testrpc for testing your app on a local blockchain. However, you will soon find you want to test the app on a live blockchain. Ethereum allows you to test on a network call Rinkeby before deploying your app live. In this guide, I’ll take your through a deployment on Rinkeby, including setting up your account, and testing your app.</p><p>This app uses Truffle and assumes you have done the following:</p><p>1. Read about Ethereum: <a href="https://www.ethereum.org/">https://www.ethereum.org/</a><br>2. Gone through the Pet tutorial with Truffle and MetaMask: <a href="http://truffleframework.com/tutorials/pet-shop">http://truffleframework.com/tutorials/pet-shop</a></p><h3>Download the Mist wallet</h3><p>To start, you will need to sink the Rinkeby network locally and to have it running so we can send our app. Start by downloading the official Ethereum wallet on this page <a href="https://www.ethereum.org/">https://www.ethereum.org/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sjk8B6NuyLc6hY1a.png" /></figure><h3>Sync the Rinkeby Network</h3><p>Once downloaded and installed, open the app and click Use Rinkeby.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-bxzo5Vp3N6pCM15.png" /></figure><p>Enter a password for your Rinkeby account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T2ztI2NW9eXxZGSp.png" /></figure><p>Then take note of where your wallet info is stored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XO-cNbMg-B_V5NzI.png" /></figure><p>Wait for the network to sync (this could take a few hours). Then click “Launch Application”.</p><h3>Getting Ether</h3><p>The next step is to request Ether from the Rinkeby Faucet. The faucet is setup to give users test out their applications on the network. On the actual Ethereum network, you will need to mine or buy ether to use your app.</p><p>To prevent malicious actors, Rinkeby asks users to use Social Media to request Ether. You can read more about there here: <a href="https://www.rinkeby.io/#faucet">https://www.rinkeby.io/#faucet</a>.</p><p>For this tutorial, we will use Twitter to request ether. Note that it can take a few hours to a few days depending on how much ether you request.</p><h4>1. Start by getting your test account number from Mist</h4><p>Select the wallets tab at the top and copy the address for one of your accounts. You should have one Main Account now if you have been following along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ahBnga-mQVPJE10L.png" /></figure><h4>2. Go to the Faucet Page and click the “Tweet” link</h4><p>This will load a populated tweet where you can enter your test network address to request Eth. Go ahead and past your address in the place of the 0x0000000000000000000000000000000000000000 address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ER6C4p4cOr5_ARWp.png" /></figure><h4>3. Paste the Link on the Faucet page</h4><p>Go back to the faucet page. You will see a form at the top. Paste the link to your post there and click how much Ether you would like to request.</p><p>You will then be presented with a loading screen to show when your Ether will be funded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3zuHC4I_rYdBI5RI.png" /></figure><h3>Deploying Truffle App to Rinkeby</h3><p>Now that we have some Ether, let’s deploy an app to test. Feel free to use an app you have already built, for this tutorial, I will use an example app from Truffle. We will then deploy the the Dapp to the test network Rinkeby.</p><h4>1. Use the App from the Pet Shop Tutorial</h4><p>Creating a Dapp is out of scope of this tutorial. We will be using the completed example from the Pet Shop tutorial: <a href="http://truffleframework.com/tutorials/pet-shop">http://truffleframework.com/tutorials/pet-shop</a>. Find that directory from your tutorial.</p><h4>2. Install Geth</h4><p>We will need the geth command line tool to run Rinkeby. Use the following url and find your install instructions for your platform: <a href="https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum">https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum</a></p><h4>3. Run Rinkeby from the Command Line</h4><p>Replace the address below with your test Ethereum address and the password with the one you used during Mist setup.</p><pre>geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal --unlock=&quot;0x0000000000000000000000000000000000000000&quot; --pasword &lt;Yourpassword&gt; --rpccorsdomain <a href="http://localhost:3000/">http://localhost:3000</a></pre><h4>4. Add Rinkeby to your Truffle deploy config</h4><p>Be sure to add your test Ethereum address in place of the place holder.</p><pre>// truffle.js</pre><pre>module.exports = {<br> networks: {<br>   development: {<br>     host: “localhost”,<br>     port: 8545,<br>     network_id: “*”, // Match any network id<br>   },<br>   rinkeby: {<br>     host: “localhost”, // Connect to geth on the specified<br>     port: 8545,<br>     from: “0x0000000000000000000000000000000000000000”,<br>     network_id: 4,<br>     gas: 4612388 // Gas limit used for deploys<br>   }<br> }<br>};</pre><h4>5. Migrate your Truffle app to Rinkeby</h4><pre>truffle migrate --network rinkeby</pre><h4>6. View your contracts on Etherscan</h4><pre><a href="https://rinkeby.etherscan.io/address/YOUR-WALLET-HERE">https://rinkeby.etherscan.io/address/YOUR-WALLET-HERE</a></pre><h3>Using your App</h3><p>Okay, now we have successfully deployed our app on Rinkeby. The next thing to do is use it. We will simply run the app locally and switch Metamask to the Rinkeby test network. This will allow use to send transactions through Rinkeby rather than our local testrpc from before.</p><h4>1. Start the app</h4><p>We are running this locally, but you can deploy this Netlify, AWS, Azure, etc and Metamask will inject the web3 console to allow for use on the blockchain.</p><pre>npm run dev</pre><p>Go to Mist and click File -&gt; Backup -&gt; Accounts. Click on rinkeby -&gt; keystore. This is the file you will need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*yCHPuup9KvqvFEFR.png" /></figure><p>Go to Metamask in your browser, select Rinkeby, import account then select the file above. Enter your password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*Hjzkxbfp5QDfl6kN.png" /></figure><h4>3. Use the app</h4><p>Now open up your app and you are running on the Rinkeby test net!</p><h3>Conclusion</h3><p>There is a lot going on here, but most of it is one time set up with your Wallet. Once you have an account and Ether, it should be easy to test out future apps.</p><p>Let me know if you have any questions by commented below or messaging me on Twitter at <a href="https://twitter.com/thehollidayin">@thehollidayinn</a></p><p><em>Originally published at </em><a href="https://blog.koalatea.io/2018/01/04/testing-your-ethereum-dapp-on-rinkeby-with-truffle/"><em>blog.koalatea.io</em></a><em> on January 4, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f089ab6c32db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/testing-your-ethereum-dapp-on-rinkeby-with-truffle-f089ab6c32db">Testing your Ethereum DApp on Rinkeby with Truffle</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Boost on Mac OSX]]></title>
            <link>https://medium.com/koala-tea/getting-started-with-boost-on-mac-osx-135a1aaba6bb?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/135a1aaba6bb</guid>
            <category><![CDATA[make]]></category>
            <category><![CDATA[cplusplus]]></category>
            <category><![CDATA[boost]]></category>
            <category><![CDATA[homebrew]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Wed, 03 Jan 2018 18:36:28 GMT</pubDate>
            <atom:updated>2018-01-03T18:36:28.575Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Boost via Homebrew</h3><ol><li>Install Homebrew if you haven’t:</li></ol><pre> /usr/bin/ruby -e “$(curl -fsSL <a href="https://raw.githubusercontent.com/Homebrew/install/master/install">https://raw.githubusercontent.com/Homebrew/install/master/install</a>)&quot;</pre><p>2. Install boost</p><pre>brew install boost</pre><h3>Get the Boost Location</h3><p>First run the command:</p><pre>brew info boost</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*349TpbuKigebnUp_Y4FJqQ.png" /></figure><p>Then grab the location. Looking above, you can see my location is</p><pre>/usr/local/Cellar/boost/1.66.0</pre><h3>Create a Boost Program</h3><p>In a new directory, create a file called <strong>main.cpp</strong>.</p><p>Here is the code example I am using:</p><pre>#include &lt;boost/lambda/lambda.hpp&gt;<br>#include &lt;iostream&gt;<br>#include &lt;iterator&gt;<br>#include &lt;algorithm&gt;</pre><pre>int main()<br>{<br> using namespace boost::lambda;<br> typedef std::istream_iterator&lt;int&gt; in;</pre><pre>std::for_each(<br> in(std::cin), in(), std::cout &lt;&lt; (_1 * 3) &lt;&lt; “ “ );<br>}</pre><h3>Compile</h3><p>Then run the following command to compile:</p><pre>c++ -I /usr/local/Cellar/boost/1.66.0 main.cpp -o boost</pre><h3>Bonus — Create a makefile</h3><p>If you want to compile with just the <strong>make </strong>command, create a file called <strong>makefile</strong>. Then use the following:</p><pre>flags = -I /usr/local/Cellar/boost/1.66.0</pre><pre>all:<br> c++ ${flags} main.cpp -o boost</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=135a1aaba6bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/getting-started-with-boost-on-mac-osx-135a1aaba6bb">Getting Started with Boost on Mac OSX</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with makefiles]]></title>
            <link>https://medium.com/koala-tea/getting-started-with-makefiles-8976e6dbf2af?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8976e6dbf2af</guid>
            <category><![CDATA[cplusplus]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[make]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Wed, 03 Jan 2018 05:49:26 GMT</pubDate>
            <atom:updated>2018-01-03T05:49:26.907Z</atom:updated>
            <content:encoded><![CDATA[<p>The make command allows for quick building of your C++ (and other language) projects. For large projects, this becomes very helpful to update portions of the project rather than recompiling everything. In this tutorial, I&#39;ll give you a intro to using make.</p><h3>Setup</h3><p>We will start with 3 files that make up our program. Make a new directory and add these three files.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f81d0d8060e4c6a884670bbe8692eca/href">https://medium.com/media/1f81d0d8060e4c6a884670bbe8692eca/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61f43ead8f634171bc30b4c93dd00d4a/href">https://medium.com/media/61f43ead8f634171bc30b4c93dd00d4a/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd86fda77c4690ec88dc11c4ffb206f4/href">https://medium.com/media/dd86fda77c4690ec88dc11c4ffb206f4/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ce6beb398c2e48d2aadabb55b2c5fc0/href">https://medium.com/media/5ce6beb398c2e48d2aadabb55b2c5fc0/href</a></iframe><h3>Automating the Basics</h3><p>Let’s start by simplifying our compile flow of these three files. To compile them normally, we would do the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/119614301376d26e8f18009f4bf1a67e/href">https://medium.com/media/119614301376d26e8f18009f4bf1a67e/href</a></iframe><p>Then we can run the program.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c221401e68670e5e586bb79ef81aa922/href">https://medium.com/media/c221401e68670e5e586bb79ef81aa922/href</a></iframe><p>This is pretty simple, but we can make that a little easier with a make file. By default, when running the make command, the program will look for a file called makefile. Let&#39;s start with that.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bcc5e764c7b793a8c7cf7c590448119/href">https://medium.com/media/4bcc5e764c7b793a8c7cf7c590448119/href</a></iframe><p>The syntax starts with the target. Here we have the target all which will be the default command for make to execute. We can then run the program likes so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bf1498a50434feb8697db5bd332072b0/href">https://medium.com/media/bf1498a50434feb8697db5bd332072b0/href</a></iframe><p>That make things a little easier :D</p><h3>Multiple Build Points</h3><p>When projects get bigger, you will want multiple targets so that you can build portions of it rather than the whole project or the all target. Let&#39;s use the current projects to show this with make. It will seem overly complex for this project, but hopefully you can see the potential.</p><p>Let’s create a new file called makefile-targets. Then add these two lines</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6704b795d0958a5f4074182a88228ecd/href">https://medium.com/media/6704b795d0958a5f4074182a88228ecd/href</a></iframe><p>This creates an all target that links to the hellomake target. This target will take two object files and build our whole project.</p><p>Next we will need to create targets to build those object files. Do that in this way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d705c15164dafc1358acdb90276b7479/href">https://medium.com/media/d705c15164dafc1358acdb90276b7479/href</a></iframe><p>The above will create our object files for our all target to use. Finally, it is good practice to create a clean target to remove object files:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/586609f6149cf481a35f2db35a827439/href">https://medium.com/media/586609f6149cf481a35f2db35a827439/href</a></iframe><p>The final file looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1aea5df3661dc659fb3c63daf74ba4d4/href">https://medium.com/media/1aea5df3661dc659fb3c63daf74ba4d4/href</a></iframe><p>We can then build our project likes so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/639c23ccbc4bf644166ae846bd61791a/href">https://medium.com/media/639c23ccbc4bf644166ae846bd61791a/href</a></iframe><p>Notice how we use the -f flag to specify our new file.</p><p>You can then rebuild a specific target like by adding an extra parameter to the make command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65b5b7509388eb9a4cd23643ad11f292/href">https://medium.com/media/65b5b7509388eb9a4cd23643ad11f292/href</a></iframe><p>This allows us to rebuild only the myclass rather than the whole project.</p><h3>Conclusion</h3><p>There is much more to make than what I have shown you. Hopefully, this gives you a glimpse into the powerful tool of make.</p><p>If you really want to dig in, check out the docs: <a href="https://www.gnu.org/software/make/manual/make.html">https://www.gnu.org/software/make/manual/make.html</a></p><p><em>Originally published at </em><a href="https://gist.github.com/87eb4b9952d08fb0115c2530435d84a3"><em>gist.github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8976e6dbf2af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/getting-started-with-makefiles-8976e6dbf2af">Getting started with makefiles</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interfaces and Abstract Classes in Javascript with ES6]]></title>
            <link>https://medium.com/koala-tea/interfaces-and-abstract-classes-in-javascript-with-es6-51364ee2cbee?source=rss-94ac629272d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/51364ee2cbee</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Keith Holliday]]></dc:creator>
            <pubDate>Tue, 02 Jan 2018 21:03:25 GMT</pubDate>
            <atom:updated>2018-01-02T21:04:06.914Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently while working on a refactor, I wanted to use ES6 classes combined with polymorphism. For this, I needed an Abstract Class. However, in Javascript ES6, Abstract Classes are not a standard. However, there is a work around using the method below.</p><h3>The Abstract Class</h3><p>This class is the base Chat Reporter. The details aren’t super important, but as you will notice, I create separate reporters that need to implement the Flag method for flagging a chat.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/399013089c64b59e5aec57f1b664ab0c/href">https://medium.com/media/399013089c64b59e5aec57f1b664ab0c/href</a></iframe><h3>The Subclass</h3><p>Now with the flag method throwing an error, this will force our subclasses to implement, otherwise the compiler will throw an error.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ddd99b5400e90e1ea9b6902342d9525d/href">https://medium.com/media/ddd99b5400e90e1ea9b6902342d9525d/href</a></iframe><p>And that is it! This is a simplified version of what I actually implemented. If you want to see the real life example, checkout it out on Github:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51364ee2cbee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koala-tea/interfaces-and-abstract-classes-in-javascript-with-es6-51364ee2cbee">Interfaces and Abstract Classes in Javascript with ES6</a> was originally published in <a href="https://medium.com/koala-tea">Koala Tea</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>