teleren/devto huggingface dataset:
Where do you get design inspirations from?
Tags: discuss
Published: 2019-06-03 17:44:35

When you're starting a new web project, where do you get design inspiration from and how do you stay up to date when it comes to new trends in web design?

<hr />

If you like my content, you might want to follow me on Twitter?! **[@fullstack_to](https://twitter.com/fullstack_to)**
How to upload pictures to Instagram via the Browser
Tags: instagram
Published: 2019-06-03 17:27:23

There are times where you feel like uploading a picture from your laptop to Instagram, but Instagram does not allow you to do that via the browser.

I discovered this trick, that will allow you to achieve that

##Follow the steps below
###Using the Chrome browser

1. Right click on your browser and select inspect (from the dropdown, select the phone of your choice)

2. Open https://www.instagram.com
It will open the mobile version of Instagram which allows you to upload  pictures, locate the plus [+] icon below and boom... you can upload your pictures via the browser
![Chrome browser](https://i.imgur.com/rcWzbgK.png)



###Using Safari browser
1. Click on preference on the menu bar
select advance tag
2. Check 'Show Develop menu in menu bar'
![Safari browser](https://i.imgur.com/4WStvcA.png)
3. Open https://www.instagram.com
4. Click on develop on the menu bar, goto user agent and select the phone of your choice
![Safari browser](https://i.imgur.com/wCUwKX8.png)
This would open the mobile version of Instagram and boom you can upload pictures and videos via the browser
Launching a New Site, Should I Bother With Google Analytics?
Tags: discuss, ga
Published: 2019-06-03 17:11:33

---
title: Launching a New Site, Should I Bother With Google Analytics?
published: true
description: "Getting ready to launch a new site. Is it time to leave GA in the dust?"
cover_image: https://images.unsplash.com/photo-1460925895917-afdab827c52f?dpr=1&auto=compress,format&fit=crop&w=880&h=&q=80&cs=tinysrgb&crop= hpjSkU2UYSU
tags: discuss, ga
---

# New Site Who Dis

I'm in the midst of preparing a new blog site for launch and I'm wondering if I should even bother with GA anymore.

What's the overall DEV opinion?

###### *image from [unsplash](https://unsplash.com/photos/hpjSkU2UYSU)*
Testing Logout Resolver (GraphQL & express-session)
Tags: graphql, express, session, authentication
Published: 2019-06-03 16:00:26

---
title: Testing Logout Resolver (GraphQL & express-session)
published: true
description: Is there a standard way of testing one's logout resolver when using GraphQL and `express-session`?
tags: GraphQL,express,session,authentication
---

Hey all, last week I was putting together a GraphQL API and while implementing authentication found myself stuck trying to test my logout resolver. The issue was that the logout resolver calls `session.destroy()` (implemented by `express-session`) but since it was calling the resolver directly, I was unsure of how to actually pass a real `Session` object (with the required  properties / methods, such as `destroy`) to the resolver, as this is normally handled by the middleware. 

Eventually, by looking at the source code for `express-session`, I was able to figure out how to create a valid `Session` object. In the end, my test looked like:

```
import { MemoryStore, Cookie } from "express-session";
[...]
    expect.assertions(2);
    // create user to first authenticate and obtain valid session with
    await User.create({ username: "name", password: "password" });
    var args = {
      input: {
        username: "name",
        password: "password"
      }
    };

    // mock session object building
    var ctx = {
      sessionStore: new MemoryStore()
    };

    var cookie = new Cookie();

    // adds valid session object to ctx
    ctx.sessionStore.createSession(ctx, { cookie });

    // log our test user in...
    await resolvers.Mutation.login(null, args, ctx);
    expect(ctx.session.user).toBeTruthy();
    
    // ...and log em out
    await resolvers.Mutation.logout(null, null, ctx);
    expect(ctx.session).toBeFalsy();
[...]
```

However, this is my first time building and testing something like this on my own - so I wanted to know if there's a known / better way of handling this issue. I searched quite a bit but the examples I found pertained to other session packages like `cookie-session`, using GraphQL on top of a REST API, and other *close, but not quite* issues / solutions. 

Any insight would be appreciated!
WWDC Discussion Thread
Tags: news, wwdc, discuss
Published: 2019-06-03 17:09:26

---
title: WWDC Discussion Thread
published: true
description: Discussing the latest news from the Apple Worldwide Developer Conference 2019.
tags: news, wwdc, ios, discuss
---

**[Apple's Worldwide Developer Conference 2019](https://developer.apple.com/wwdc19/)** is taking place this week.

## 👉 You can [watch the livestream now](https://www.apple.com/apple-events/livestream/)

This is a discussion thread to talk about any of the announcements and take-aways from WWDC19.
How I met your Gatsby - Day 3,4 && 5
Tags: challenge, gatsby, blogging, 30daysofgatsby
Published: 2019-06-03 16:56:53

---
title: How I met your Gatsby - Day 3,4 && 5
published: true
description: Gatsby in 30 days
tags: #challenge ,#gatsby, #blogging, #30daysofgatsby
series: The Great Gatsby 
---

Hey ,

Day 3 - I had some pending works.
Day 4 - Basically sunday. 

 ![Alt text of image](https://media.giphy.com/media/Gf3fU0qPtI6uk/giphy.gif)

So anyway Gatsby seem to have a large number of [plugins] (https://www.gatsbyjs.org/plugins/)

Used [Typography.js]( http://kyleamathews.github.io/typography.js/) - is a JavaScript library which generates global base styles for your site’s typography.
 
Common layout for header,footer,section and articles added as components.

This is just a portion of the tutorial . I couldnt do much today due to lazyness. 

For a side note if anyone wondering about any specific tasks in angular 2+ or laravel 5.x, Let me know. I could probably help you with that or add a new post with a solution. 

I am gonna jump ahead to Graphql next day.
Starting a 2 man side hustle - where to begin?
Tags: sideprojects, discuss
Published: 2019-06-03 16:41:40

Hey everybody!

I was wondering if there are any good places to find people to start a side hustle/side project with? 

I just had an idea for a side project but it would be interesting to do it with someone else for a change. 
I don't really have any developer friends outside work so would be cool to make some more contacts to share some knowledge with and at the same time work on a side project. Furthermore it would increase the speed at which the app would develop. 🤟

Anyone who have experience in this area? How to get started?
Should this feature be added to Dev.to ? 
Tags: discuss, quora, webdev, webperf
Published: 2019-06-03 16:34:38

---
title: Should this feature be added to Dev.to ? 
published: true
tags: discuss, quora, webdev, webperf
---
Hey. I have a suggestion for the Dev.to There should be a feature that shows the number of total views on all the posts written by the user, like on Quora. What do you think about that?
The DevFest WI CFP Is Open!
Tags: conference, cfp
Published: 2019-06-03 16:32:07

We want YOU to speak at DevFest WI! DevFest WI is an inclusive, positive conference for all technologists coming to downtown Madison September 28th.

We are seeking 10- and 30-minute presentations on a broad range of topics, including web development, cloud computing, core skills (communication, empathy, negotiation, organization, etc.), Firebase, accessibility, ML/AI, Android, Flutter/Dart, Material Design, and more.

We are particularly interested in talks on topics that the you, the speaker, are excited about and that can be understood and appreciated by non-specialists. Presentations with more than one speaker are welcome. First-time speakers are encouraged to apply.

To submit a proposal, please fill out two brief forms: the [speaker info form](https://forms.gle/VLzVhZYnA1EWHg6N8) and the [proposal form](https://forms.gle/sapi9R2o1yWQcXeA6).

You are welcome to submit multiple proposals; you only have to complete the speaker form once. Be sure to include the same email address(s) on both forms.

The CFP will close June 30th and talks will be accepted on a rolling basis so submit early.

Don't have any proposals yet? [Come to our CFP workshop](https://www.meetup.com/gdgmadison/events/261959209/) to work on proposals for DevFest WI (or any other conference).
Sapper - Bootstrap your Svelte project
Tags: webpack, javascript, svelte, node
Published: 2019-06-03 16:19:44

---
title: Sapper - Bootstrap your Svelte project
published: true
description: We will look into using Sapper with Webpack and build a small notes application and talk about the different features available in the Sapper framework.
tags: Webpack, JavaScript, Svelte, nodejs
---

{% youtube i1S9Gf79634 %}
Congratulations to Phil Nash for being the first winner of the Big Thread Badge
Tags: meta, bigthreadbadge
Published: 2019-06-03 15:49:23

This is the first week we announce a Big Thread Badge winner, and the recipient is Phil Nash.

{% user philnash %}

The Big Thread Badge is awarded to the person who creates a discussion thread on the site that sparks the most collective comment love (e.g. score as determined by total ❤️ reactions and adjacent ranking factors).

This was Phil's thread:

{% link https://dev.to/philnash/those-silly-mistakes-we-all-make-j87 %}

Details about this contest can be found in this post from last week:

{% link https://dev.to/devteam/we-ll-be-adding-more-design-and-moderation-clarity-to-tags-like-help-discuss-etc-we-re-also-introducing-a-new-badge-483a %}

Entry is simple: Start a thread that is bound to spark a lot of comments. Ask the community to tell a certain kind of story and get lots of comments!

DEV employees are not eligible for the Big Thread Badge. 🙂
Blog-like posts, Animate on Scroll, Action quote | Module Monday 41
Tags: showdev, opensource, webdev, javascript
Published: 2019-06-03 15:47:05

---
title: Blog-like posts, Animate on Scroll, Action quote | Module Monday 41
published: true
description: Module Monday 41
tags: showdev, opensource, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/b_rgb:ffffff,c_lpad,h_350,w_800/v1559354059/bloglike_gpx8n9.gif
canonical_url: https://guide.anymod.com/module-monday/41.html
---

## Open-source mods for your next project
Everything below is open source and free to use on any website, web app, or anywhere else. There are hundreds more like these on [Anymod](https://anymod.com).

Click a mod to see it along with its source code.

## Bloglike posts

Single-page that reads similar to individual blog posts.

<a class="btn btn-sm" href="https://anymod.com/mod/blog-like-sections-dkdabl?v=20">View mod</a>

<a href="https://anymod.com/mod/blog-like-sections-dkdabl?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1559354059/bloglike_gpx8n9.gif"/>
</a>

## Animate on Scroll

Animate your text and images as they come into the viewport.

<a class="btn btn-sm" href="https://anymod.com/mod/scroll-animate-section-kdnkok?preview=lorem">View mod</a>

<a href="https://anymod.com/mod/scroll-animate-section-kdnkok?preview=lorem">
  <img src="https://res.cloudinary.com/component/image/upload/v1559432057/scroller_qi0v9z.gif"/>
</a>

## Product grid

Diagonal grid for showcasing your products.

<a class="btn btn-sm" href="https://anymod.com/mod/product-diamonds-llkbml?v=20">View mod</a>

<a href="https://anymod.com/mod/product-diamonds-llkbml?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1559432057/products_tvdhlg.gif"/>
</a>

## Action quotation

Add a quotation with a nice big button.

<a class="btn btn-sm" href="https://anymod.com/mod/bold-quotation-section-mlaboo?v=20">View mod</a>

<a href="https://anymod.com/mod/bold-quotation-section-mlaboo?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1559355518/quotation_gdrc2v.png"/>
</a>

## Get in touch form

Name, email, department, and message. Works automatically.

<a class="btn btn-sm" href="https://anymod.com/mod/get-in-touch-form-nkodmb?v=20">View mod</a>

<a href="https://anymod.com/mod/get-in-touch-form-nkodmb?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1559432269/get-in-touch-form_o6j3lm.png"/>
</a>

<hr>

I post new mods from the community [here](https://dev.to/tyrw) every (Module) Monday -- I hope you find them useful!

Happy coding ✌️
Ruby Conditionals Return Values:  Use Them!
Tags: ruby
Published: 2019-06-03 15:42:04

---
title: Ruby Conditionals Return Values:  Use Them!
published: true
description: 
tags: ruby
---
Ruby conditionals return values.  That is, a Ruby conditional such as <code>if</code> or <code>case</code> is an expression that returns a value.

You can use these values to simplify your code.

The examples below use the Interactive Ruby Shell, <code>irb</code>.

<h4>If-Else</h4>

Assume that these are defined:

```ruby
def some_condition; true; end
def an_expression_that_returns_a_value; 0; end
def another_expression_that_returns_a_value; 1; end
```

This:

```ruby
if some_condition
  q = an_expression_that_returns_a_value
else
  q = another_expression_that_returns_a_value
end
# => 0
q
# => 0
```

Can use the return value to become this:

```ruby
q = if some_condition
      an_expression_that_returns_a_value
    else
      another_expression_that_returns_a_value
    end
# => 0
q
# => 0
```

Of course in this case the ternary operator would suffice, but it can be harder to read:

```ruby
q = some_condition ?
      an_expression_that_returns_a_value :
      another_expression_that_returns_a_value
# => 0
q
# => 0
```

<h4>If-Elsif-Else</h4>

Now assume further that these are also defined:

```ruby
def some_other_condition; false; end
def yet_another_expression_that_returns_a_value; 2; end
```

This:

```ruby
if some_condition
  q = an_expression_that_returns_a_value
elsif some_other_condition
  q = another_expression_that_returns_a_value
else
  q = yet_another_expression_that_returns_a_value
end
# => 0
q
# => 0
```

Can use the return value to become this:

```ruby
q = if some_condition
      an_expression_that_returns_a_value
    elsif some_other_condition
      another_expression_that_returns_a_value
    else
      yet_another_expression_that_returns_a_value
    end
# => 0
q
# => 0
```

<h4>Case</h4>

This:

```ruby
case
  when some_condition
    q = an_expression_that_returns_a_value
  when some_other_condition
    q = another_expression_that_returns_a_value
  else
    q = yet_another_expression_that_returns_a_value
  end
# => 0
q
# => 0
```
Can use the return value to become this:

```ruby
q = case
    when some_condition
      an_expression_that_returns_a_value
    when some_other_condition
      another_expression_that_returns_a_value
    else
      yet_another_expression_that_returns_a_value
    end
# => 0
q
# => 0
```
Github bloquea acceso desde Cuba
Tags: github, embargo, news
Published: 2019-06-03 15:36:08

---
title: Github bloquea acceso desde Cuba
published: true
description: 
tags: github, embargo, news
---

Bueno, GitHub a decidido que el código fuente de mis proyectos no debe ser visto desde el país donde vivo y los produzco. Muchas gracias por golpear aún más a los que ya tenemos pocas puertas abiertas y ninguna opinión en el proceso.

[Ayúdame a protestar en Twitter](https://twitter.com/yorodm/status/1135569500437405696)

## UPDATE

Parece que han restaurado el acceso, no hay comunicados oficiales todavía.
Custom Global Variables Using the Config File
Tags: expressionengine, quicktips, intermediate
Published: 2019-06-03 15:13:00

---
title: Custom Global Variables Using the Config File
published: true
date: 2019-06-03 15:13:00 UTC
tags: ExpressionEngine,QuickTips,Intermediate
canonical_url: https://u.expressionengine.com//article/custom-global-variables-using-the-config-file
cover_image: https://u.expressionengine.com/asset/article-images/global-variables.png
---

One thing I like to do is take advantage of `global_vars` in template tags. I’m a big fan of keeping configuration in the site’s `config.php` file. That way, values can be changed depending on the environment either by using something like Ansible to provision and configure your site, or by using PHP’s `getenv()` functions. For additional reading on environment based configuration check out [The Twelve-Factor App](https://12factor.net/config).

Here is an example of what is included in nearly all of my ExpressionEngine site’s `config.php` files. Each variable is prefixed with `global:`, similar to how we prefix the `pre:` variables [in my previous article](https://u.expressionengine.com/article/preload-replace-variables).

```
$default_global_vars = [
    'global:disabled_params' => 'disable="trackbacks|pagination|member_data"',
    'global:disabled_params_all' => 'disable="trackbacks|pagination|member_data|category_fields|categories|custom_fields"',
    'global:disabled_params_strict' => 'disable="trackbacks|pagination|member_data|category_fields|categories"',
    'global:blog_category_groups' => '2|3|5|6',
    'global:some_api_key' => '98ufahaskdfnasd312',
];

if (!isset($assign_to_config['global_vars'])) {
    $assign_to_config['global_vars'] = [];
}

$assign_to_config['global_vars'] = array_merge(
    $default_global_vars,
    $assign_to_config['global_vars']
);

```

Now in my templates I can shorten my tags, and globally update every entries tag on the site with a single change in the `config.php` file.

```
{exp:channel:entries {global:disabled_params}}
    ...
{/exp:channel:entries}

```

Some people like to prefix everything. I’ve seen custom fields prefixed with `cf_`, thus their templates are filled with `{cf_body}`, `{cf_summary}`, or `{cf_related_entries}`. I’ve personally never been a fan of prefixing field variables unless it is a prefix which helps indicate what channel it belongs to, such as `{person_first_name}`. `{cf_person_first_name}` feels redundant to me, but again, that is personal preference.

Prefixing or no prefixing, find what works for you, just pick a pattern and be consistent 😊

--
Originally published by <a href="https://u.expressionengine.com/author/brian-litzinger">Brian Litzinger </a> at <a href="https://u.expressionengine.com//article/custom-global-variables-using-the-config-file">u.expressionengine.com</a>
How to set up an NGINX reverse proxy cluster with a shared cache
Tags: cache, reverseproxy, tutorial, devops
Published: 2019-08-04 17:14:45

---
title: How to set up an NGINX reverse proxy cluster with a shared cache
published: true
tags: cache,reverse-proxy,tutorial,devops
canonical_url: 
---

### What is NGINX?

NGINX is a Web Server/Load Balancer/Reverse Proxy which uses an event-driven model to handle incoming requests instead of those costly threads!

The rise of NGINX in recent years has made it the de facto standard for many who need performance and more.

#### What is the problem?!

Scaling edge reverse proxies can be a little tricky if not familiar. Problems appear when you need lots of storage to cache files. There is a limit to scale your hardware vertically and scaling vertically is not an elegant solution anyway.

As you may know, NGINX instances don’t play well together when using shared storage (Remember there will also be issues with latency and … ).

Since these are edge servers we won’t have the option to use Consistent Hashing in order to send the request to the server that will have the cache ready.

#### Solution

Alternatively, we can design a two-stage cluster recommended by NGINX folks themselves. Look at the image below to understand better.

![](https://cdn-images-1.medium.com/max/1024/1*xGXPVoNh2PdNEP94qneLQQ.png)<figcaption>Combining Load Balancers and Cache Servers in a two-stage NGINX cluster</figcaption>

In this architecture, we have two instances of NGINX in each server; one acting as a simple Load Balancer and another one as a Cache Server. So when a client sends an HTTP request it first hits a Load Balancer (It doesn’t matter which one), then the Load Balancer calculates a consistent hash based on a key (usually a mixture of URI and other variables). The Load Balancer will use the created hash to proxy the request to a single Cache Server every time and then the Cache Server proxies the request to the Origin Server if it’s a cache miss or serves it from the local storage if it’s a hit.

For the people who understand codes and config files better than a bunch of paragraphs, I have prepared this configuration of a cluster consisting of 3 servers.

**Example Configuration:**

{% gist https://gist.github.com/satrobit/526c91635f2ae603c98eabebbc0be880 %}

You should modify the config file according to your cluster setup and run it in every edge server.

#### Links

For a more detailed read on this topic, please refer to [Shared Caches with NGINX Plus Cache Clusters, Part 1](https://www.nginx.com/blog/shared-caches-nginx-plus-cache-clusters-part-1/) and [Shared Caches with NGINX Plus Cache Clusters, Part 2.](https://www.nginx.com/blog/shared-caches-nginx-plus-cache-clusters-part-2/)
What is the best mouse for a busy software developer?
Tags: help, mouse, software, developer
Published: 2019-06-03 14:31:43

---
title: What is the best mouse for a busy software developer?
published: true
tags: help, mouse, software, developer
---
What mouse would you recommend to a developer who works for around 3/4 of a day? It would also be awesome to know what mouse you currently use, it's pros and cons, etc.
What languages are you learning or planning to learn, and why?
Tags: discuss, learning, languages
Published: 2019-06-03 14:23:29

---
title: What languages are you learning or planning to learn, and why?
published: true
description: 
tags: discussion, learning, languages
---

Are you learning a new language? What is the reasoning behind what you are learning? What principles are you picking up along the way?
Looking to connect with React community
Tags: react
Published: 2019-06-03 14:19:51

I am the co-founder of my own meetup group here in Dallas, TX as well, called the Java Developers of Dallas. The reason I am reaching out to your React community is for your assistance. I have found that the user group community is really the best way to connect with professionals and build trust within your own brand image. I have sponsored, hosted and managed multiple user groups in the D/FW metroplex for over 10 years. 

Now that I have moved on to this great opportunity at Korn Ferry after 15 years with Paladin Consulting, I am looking to connect with some of the New York City & Bay Area groups to assist in establishing some connections and also share a couple of opportunities. 

What’s different about my role is that I am not working for a contingent/staffing firm. I am working on retained, paid searches by our top clients. They have come to us as the premier search firm in the world to help attract and identify top tech talent for two key roles I am working on. 

Can you help point me in the right direction?

Sincerely,
Marlon Monsalve
Senior Recruiter
marlon.monsalve@kornferry.com
O: 972-525-2219
www.kornferry.com
Could dev.to allow larger tag names?
Tags: discuss, meta
Published: 2019-06-03 14:04:28

---
title: Could dev.to allow larger tag names?
published: true
tags: discuss, meta
---

Well, I know that very large tag names would not make sense. But the current limit does not allow me to use common terms like #ArtificialIntelligence or #ReinforcementLearning. One alternative would be to use their respective acronymous like #AI or #RL, but I think that this alternative loses clarity. What do you think guys?