teleren/devto huggingface dataset:
kubectl port-forward External Services using TCP Proxy in Kubernetes
Tags: devops, kubernetes
Published: 2019-05-02 09:24:26

---
title: kubectl port-forward External Services using TCP Proxy in Kubernetes
published: true
description: How to port-forward services like databases that are deployed in a private subnet that your containers connect to.
tags: devops, kubernetes
---


## Synopsis

It is common that some of your Workloads connect to external services such as databases that run outside your Kubernetes Cluster. These external services are usually secured and deployed in a private subnet.

My team currently uses Google Kubernetes Engine and we use GCP Memorystore (Redis as a Service) for caching. For us to access Memorystore securely, we will have to provision a VM that will act as a bastion host but we found a better approach to deal with this.

### Port-forwarding with TCP Proxy

All our services run in Kubernetes, and as much as possible we want to stick with the `kubectl everything` workflow when dealing with our services. All thanks to [tecnativa/tcp-proxy](https://github.com/Tecnativa/docker-tcp-proxy), it makes TCP proxying really easy with Docker.

So basically, any external services that our Kubernetes Cluster can access can also be accessed locally by deploying this sucker. 

> WARNING: This can be a security flaw in your case, but not for us.


```yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: redis-proxy
  name: redis-proxy
  namespace: default
spec:
  selector:
    matchLabels:
      app: redis-proxy
  template:
    metadata:
      labels:
        app: redis-proxy
    spec:
      containers:
      - image: tecnativa/tcp-proxy:latest
        imagePullPolicy: Always
        env:
          - name: LISTEN
            value: ":6379" # The listen address that it will be exposed to.
          - name: TALK
            value: "10.1.1.5:6379" # Private address of Memorystore.
        name: redis-proxy
        resources:
          requests:
            cpu: 10m
            memory: 10m
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
```

With the tcp-proxy deployed, we can now just port-forward the tcp-proxy Pod.

```bash
kubectl port-forward redis-proxy 6379:6379
```

And access Memorystore locally using `redis-cli`.

```bash
redis-cli -p 6379
```
Your IDE or TextEditor: WHY?
Tags: ide, texteditor, productivity, survey
Published: 2019-05-02 09:18:10

---
title: Your IDE or TextEditor: WHY?
published: true
description: Discussion or some thoughts about reasons you chose one ore another IDE or TextEditors
tags: ide, texteditor, productivity, survey
---

Hello, community!

Today I ask you to share your thoughts about your IDE or TextEditor. 
E.g. your way to choose your working tool, previous experience of using some tools, pros\cons etc.
Please, **don't start another holywar** (let's try at least :) )

Let me start.
I'm using [JetBrains WebStorm](https://www.jetbrains.com/webstorm/) as my main IDE, and [SublimeText](https://www.sublimetext.com/) for simple code manipulations. From "in-terminal" editors I prefer [Nano](https://www.nano-editor.org/). I've tried a lot of different tools in the past, such as [NetBeans](https://netbeans.org/), [Eclipse](https://www.eclipse.org/), [LightTable](http://lighttable.com/), [VSCode](https://code.visualstudio.com/), etc. But still i'm with WebStorm cause of comfortable refactoring powers, beautiful visualisation (new [MaterialUI](https://plugins.jetbrains.com/plugin/8006-material-theme-ui) themes is awesome) and sometimes high RAM consuming( ;) )

Just share your thoughts. I'm really interested in your experience.

Peace
Is Drupal 8 The Secret Weapon For Your Multilingual Website? 
Tags: drupal, multilingualcms, webcmsdevelopment, webdev
Published: 2019-05-02 08:09:56

---
title: Is Drupal 8 The Secret Weapon For Your Multilingual Website? 
published: True
tags: Drupal, Multilingual CMS, web cms development, web development
description: Drupal 8 is the perfect solution for multilingual website development. Expand your business internationally and target audiences in every corner of the world with Drupal CMS.
---
The one in which Jim points out a coffee shop lesson
Tags: dailywriting
Published: 2019-05-02 15:08:02

---
title: The one in which Jim points out a coffee shop lesson
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/the-one-in-which-jim-points-out-a-coffee-shop-lesson/
---

Long-time reader Jim was reading yesterday’s email about baristas _from the #1 rated coffee shop in America_ and pointed out an interesting idea:

_“One thing I’ll add is that the best shops are often rigid or uncompromising about something that ends up being inconvenient for customers.”_

I also found many practices of great coffee shops annoying at first, for example, that they only serve drinks in one size. That seemed crazy to me when I was a coffee novice!

_But, now I look for that as a sign of a great coffee shop._

See, I learned that great coffee shops tune their recipes for a particular ratio of water, coffee (and maybe milk.) This is especially important with pour-overs and espresso drinks.

Crappy coffee shops simply keep adding liquid to fill the cup without regard to taste.

This brought up an interesting parallel: **Maybe the best programmers appear annoying to novice managers.**

Where a less experienced programmer will jump into coding, great programmers start by understanding. When they receive a new project, they begin by asking questions. Probably LOTS of questions.

Asking a lot of questions might not feel ‘productive’ to a novice manager, or one in a big hurry – so it might appear annoying.

Today I’m going to be on the lookout for ‘annoying’ things, and ask myself, _“Could this be an opportunity for learning?”_

Thanks, Jim!

Best,  
Marcus

**[[SELF SPONSOR] Software Leader Seminar teaches you how to help your team learn from their success and failures. Starts May 24th!](https://marcusblankenship.com/software-leader-seminar-2019/)**

The post [The one in which Jim points out a coffee shop lesson](https://marcusblankenship.com/the-one-in-which-jim-points-out-a-coffee-shop-lesson/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
Zero Dependency Open Source
Tags: discuss, opensource
Published: 2019-05-02 07:29:01

---
title: Zero Dependency Open Source
published: true
description: Writing a zero-dependency library could be the way to bring an immortal contribution to the developer communities
tags: discuss, opensource
---

Writing a zero-dependency open-source library could be the way to bring an immortal contribution to the developer communities. Adding dependencies to your open-source will bring many update/upgrade work while your busy life goes on. And you/community may give-up one day to update those dependencies because of several reasons. Even the zero-dependency library might need language version updates. So, the real intention is keeping as minimum dependency as possible. 

---

Instead of putting dependencies, put interfaces to the library and let the library users to use their own choice of libraries by implementing your interface. And share sample implementations with a dependent library as an example instead of directly adding implementation. (What is being defined is also a part of hexagonal-architecture pattern for software design which makes the library optioned without implementation choices.) 

**4 steps to provide zero-dependency library:**
1. Implement your library functionality
2. When you need an external dependency(external library from another author), create an interface instead of adding the dependency
3. Document a sample implementation with/without dependency (but do not implement)
4. Let the library user decide what to use & leave the interface implementation to the library user. 

---

This could be the way to bring an immortal contribution to the developer communities. Since there will be no dependency, the library can be used for new projects/libraries with different implementation details. Even after years, new implementations would be possible without updating the library...

Before taking action, it is highly recommended also reading [DHH's Rails is Omakase](https://dhh.dk/2012/rails-is-omakase.html) post. More ideas are highly welcome. Let's discuss.
Prevent undesired code changes
Tags: developertools, codefreeze, productivity, communication
Published: 2019-05-02 07:04:16

---
title: Prevent undesired code changes
published: true
description: How to prevent undesired code changes at the wrong times
tags: developertools,codefreeze,productivity,communication
---

Startups in general tend to grow and scale pretty fast. When the business has a pretty great market niche, everything is even faster. All of this growth entails showcasing  products, pitching the business ideas to potential investors and even making live demos.

Fast growth is great and as startups we should embrace that. However, sometimes it is ok to slow down. It is ok to say: "We won't be merging new code this weekend". It could be because we're pitching the product to investors or because we're gonna be doing maintenance to the servers or because of any other reason. It should be fine to slow down when it's needed.

Teams usually set a period of time in which all code changes are frozen or blocked (This is what we call "code freeze"). There is not a formal or standard way to do this. It's done via email or via Slack.

This seems to work just fine, right? Well, sometimes it is hard to tell, if the code freeze is still on or whether X or Y project falls into that period of time, or even worse, there's not an actual way to prevent someone from merging code. Some teams disable automatic deploys, which is not so ideal, it requires the appropriate people to be available when it is time to enable them back.

Great communication across the teams is very important and enforcing certain rules is even more.

This is what Frozonic is here to help you with. Not only to keep code freezes well communicated across teams and projects but also to enforce nothing is actually merged during code freezes.

You can prevent pull requests from being merged into master if the code freeze check is required for merging. You can easily configure all this periods of time from the Frozonic dashboard.

You won't have to be dealing with permissions and access control since it is all figured out. We map user's access level from Github. So that you don't have to take that extra step of setting everything up once again.

We encourage you to try [Frozonic](https://www.frozonic.app) and let us know what you think. Join our beta today. If you liked it tweet about it: [@FrozonicApp](https://www.twitter.com/frozonicapp)
Testing Deep-Link URLs using ADB
Tags: android, tools
Published: 2019-10-14 07:06:11

---
title: Testing Deep-Link URLs using ADB
published: true
tags: android, tools
canonical_url: https://varunbarad.com/android/2019/05/02/testing-deep-link-urls-using-adb.html
---

ADB is a treasure trove and I regularly keep finding some gem from it. Recently I was working on creating some new deep-link integrations for the company I work at. The below command fires an event similar to one that gets fired when we click on a link in the device itself.

The pattern for command to trigger the deep-link is as below:

```bash
adb shell am start -a android.intent.action.VIEW -d "your-link-goes-inside-these-quotes"

```

Example

```bash
adb shell am start -a android.intent.action.VIEW -d "https://varunbarad.com/blog"

```

This was just a quick ADB tip that I have learnt and wanted to share with you. If you have any more such tips or tricks, I would love to hear about them on [twitter thread for this article](https://twitter.com/varun_barad/status/1123999186574303234). Feel free to contact me for anything else that you would like to talk about [@varun\_barad](https://twitter.com/varun_barad).
How to use different MySQL database per pull-request with Heroku Review Apps (Rails)
Tags: rails, heroku
Published: 2019-05-02 05:46:36

---
title: How to use different MySQL database per pull-request with Heroku Review Apps (Rails)
published: true
description: How to use different MySQL database per pull-request with Heroku Review Apps (Rails)
tags: rails, heroku
---

## Prerequisites

* Rails v5.2.x
* Ruby v2.6.x
* Heroku
* MySQL (ClearDB)


## Summary

Use `CLEARDB_<colorname>_URL` for each Heroku Review Apps

The sample code is here:

{% github mmyoji/hreviewapp %}


## Background

Some of my developer teams want to have a different app environment through their development process. Some use their own staging environment, others don't have that and just use local environments.

[Heroku Review Apps](https://devcenter.heroku.com/articles/github-integration-review-apps) is a very good choice for that situation, but I didn't know whether it can use different database per pull-request. You might know Rails app development often has database migrations and separating database per pull-request makes developers happier :)

If you use MySQL (sorry I didn't research PostgreSQL case), YOU CAN DO IT and I explain this in this post.


## Setup

I don't talk about setup the heroku app, creating a pipeline and setup review apps here.

They're not difficult, just talk about ClearDB useful feature.


## CLEARDB_XXX_URL

I found that ClearDB issues unique database URL per review app.

It is like `CLEARDB_NAVY_URL`, `CLEARDB_PURPLE_URL`, etc.

And I thought I could use this if it is set in the environment and the dirty script is here:

https://github.com/mmyoji/hreviewapp/blob/master/config/database.yml#L54

```yaml
production:
  # ...
  url: <%= ((key = ENV.keys.find { |k| k =~ /^CLEARDB_([A-Z]+)_URL$/ && k != "CLEARDB_DATABASE_URL" }) && ENV[key].sub("mysql://", "mysql2://")) || ENV.fetch('DATABASE_URL') %>
```

This code sucks, but you know what is done here.

If `CLEARDB_XXX_URL` exists, replace string [in proper format](https://devcenter.heroku.com/articles/cleardb), or use `DATABASE_URL` like as a normal app.

Don't forget to run `rails db:schema:load` or `db:migrate` after review app deployment.

see: https://github.com/mmyoji/hreviewapp/blob/master/app.json#L44

That's it :wave:
Got those dev.to stickers!
Tags: inspiration
Published: 2019-05-02 04:39:46

---
title: Got those dev.to stickers!
published: true
description: Stickers arrived! Now to decide what to do with them.
tags: inspiration
---

I just had to share that my dev.to stickers arrived and they are awesome, now I have to decide all the right places to put them to spread the love.

![](https://thepracticaldev.s3.amazonaws.com/i/lu2reph1vdtflhtb9a45.jpg)

Thanks dev.to
Safe Spaces & WoSEC
Tags: womenintech, infosec, inclusion, security
Published: 2019-05-02 03:54:44

---
title: Safe Spaces & WoSEC
published: true
description: The story of WoSEC: Women of Security.
tags: womenintech, infosec, inclusion, security
---

Approximately a year ago I visited Israel for the first time and had the pleasure of meeting several women from the Cyber Ladies meetup group.  I saw the wonderful friendships that they had, built from this meetup of other women in their industry, and thought "I want that too, that's a fantastic idea". My friend Donna and I started a similar meetup in Ottawa, Canada, which has since turned into an international organization called [WoSEC: Women of Security](https://womenofsecurity.com). 

The purpose of this blogpost is to tell you about our community, and if you are woman (or identify as a woman in any way) to invite you to participate. Girls accompanied by an adult are also welcome.

![WoSEC Ottawa Brunch and Bitch](https://thepracticaldev.s3.amazonaws.com/i/sv5hlzi1d8uxf08ftus6.jpg)

####WoSEC: Women of Security

* WoSEC is a community for women to make new friends in Security, so that women not only join our industry, but they STAY.
* We shine the spotlight on great things that women are doing in InfoSec with our twitter account, with which we strive to create a constant stream of positivity.
* We "brunch and bitch" (like a stitch and bitch, but with food), so that we can make friends, network, and create mentoring relationships.
* We hold safe spaces for learning, with women-only workshops, lessons or talks. We do this at meetups and at conferences.
* We "Crash boy events"; by attending in a group, none of us is ever "the only woman there".
* We are trying to create a community for all women who work in (or who want to work in) InfoSec, in hopes that they will have more opportunities, more support, and more fun.
* We don't have membership fees, all women are welcome, and even if someone is not involved with WoSEC we are happy to share their accomplishment and cheer them on.
* WoSEC has resulted in: women starting businesses together, mentoring relationships, job interviews, internships, people being able to recruit from our community, a cheering squad showing up to surprise female speakers, standing up for each other, priceless advice, and friendship.

* We can advocate for each other, and we do. We share hotel rooms or give each other rides, we team up for large challenges, we introduce people who need to meet, and so much more; we are building a community together. 

I invite you to join our meetups around the world (just search "WoSEC" on meetup to see if we have one near you), or reach out to see how you can get involved or start your own chapter. 

Thank you for reading.

[Join us in our online community!](https://wosec.tribe.com)
Day 12(?) Learning Javascript
Tags: beginners
Published: 2019-05-02 03:16:52

---
title: Day 12(?) Learning Javascript
published: true
description: 
tags: #beginner
---

Confession: I was working on an Advanced Control Flow exercise involving Ternary Operators and the Switch function, and got stuck. Grrrr!

I typed my solution code, looked at it, and deleted it. Then tried again. I looked up a few resources on Ternary and Switch functions (Stack Overflow, YouTube vids, etc), typed my solution again, looked at it...then deleted it.

It was only when I finally looked at the instructor's solution and realized I was correct with my FIRST solution that I wanted to kick myself.

Lessoned Learned: I need to just trust myself and not overthink these things.
[Video] Design Systems
Tags: webdev, design, designsystems
Published: 2019-05-02 02:49:01

---
title: [Video] Design Systems
published: true
description: Adam Argyle is a guest on the State of the Web series to talk about design systems and how they shape the relationship between designers and developers.
tags: webdev, design, design-systems
---

Adam Argyle is a guest on the State of the Web series to talk about design systems and how they shape the relationship between designers and developers.

{% youtube jpmeWXISU5E %}
Neither You nor Your Work Has to be Perfect
Tags: learning, experience, perfection, expectations
Published: 2019-05-02 00:27:04

---
title: Neither You nor Your Work Has to be Perfect
published: true
description: "We all feel pressure to make things perfect, but don't let it crush you. There are alternatives we can work with."
tags: learning, experience, perfection, expectations
cover_image: https://firebasestorage.googleapis.com/v0/b/ashleemboyer-2018.appspot.com/o/images%2Fperfect.jpg?alt=media&token=af9863be-79b8-4b20-b02e-4272da8b7612
canonical_url: https://ashleemboyer.com/neither-you-nor-your-work-has-to-be-perfect
---

*This post is also over on [my personal blog](https://ashleemboyer.com/neither-you-nor-your-work-has-to-be-perfect).*

Let's face it: nothing you make will ever be absolutely perfect. Some people may not like the final product. Maybe you could remove a paragraph or two from your blog post or reword a few sentences. Your code could probably be refactored in a few different places. That drawing might look cleaner if you erase a couple of smudges.

We all know what happens to projects once we start falling down these rabbit holes. "I'll just spend a couple of minutes fixing this little thing," can turn into a few hours or longer if you're not careful. In my experience with code, it could take even longer because you might accidentally break something totally different while trying to clean up a few functions.

Obviously, there's a time and a place for everything. Projects put you through various phases of pressure. Sometimes, you don't have the chance to make the code as beautiful as you want. Functionality is almost always more important because your client probably won't ever see your code. All they care about is that their product works well. So, when it comes time to punch, try not to worry too much about making the code perfect.

Rather, make some quick notes about where the code needs some help and what you might to do make it better. Hopefully, you can go back later and make the improvements, but if that isn't the case, you can either pass those notes along to the next person or use them to explain what you learned about the project experience. People expect you to learn more than anything. They will value the experience you have to share.

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).

---

*[Image](https://unsplash.com/photos/l5Tzv1alcps) by [Alex wong](https://unsplash.com/@killerfvith) on [Unsplash](unsplash.com)*