teleren/devto huggingface dataset:
Valet vs. Homestead – php development on macOS
Tags: homestead, laravel, php, valet
Published: 2019-06-26 14:32:27

---
title: Valet vs. Homestead – php development on macOS
published: true
tags: Homestead,Laravel,PHP,Valet
canonical_url: https://42coders.com/valet-vs-homestead-php-development-on-macos/
---

There are two popular ways to set up Laravel/php development environment on macOS: Valet and Homestead. Both are good for development, but their approach is different. Valet is a minimalistic, fast development environment, but Homestead offers a full vagrant virtual machine – with all it’s advantages and disadvantages. Let’s dive into the strengths and weaknesses of both.

## Valet

#### Good

- Easy to set up
- Fast – it is basically just nginx with dnsmasq
- No configuration is necessary when you add a new project, just create a folder in your the web root and you are ready to go
- It starts automatically with the operating system
- No need for provisioning/start up/ssh

#### Bad

- You have to install all the other necessary services like php, mysql, mongodb etc manually, but it is easy to do on mac with Homebrew
- If you have projects which requires different versions of php, switching between the php versions could be tricky

## Homestead

#### Good

- It provides a full Ubuntu virtual machine
- All necessary services are preinstalled
- Easy to install other Linux services and binaries if necessary
- Work on both macOS, Windows, and Linux, and the same development environment can be set up for every team member regardless of os.

#### Bad

- It is slow. And sometimes even slower.
- Every new project requires new entry in Homestead.yaml and /etc/hosts
- Npm run dev runs extremely slow in vagrant, so it is better to run it outside, directly on mac, but all php commands (e.g. artisan) and composer should run in Homestead, which can be confusing sometimes
- Setting up debugger requires some more effort compared to Valet (especially for php cli)

Both of these systems work well for php development, and as the documentation states these are intended for different audiences. It depends or your taste and your team’s needs which one suits you better. My choice is Valet.

The post [Valet vs. Homestead – php development on macOS](https://42coders.com/valet-vs-homestead-php-development-on-macos/) appeared first on [42 Coders](https://42coders.com).
What’s All The Buzz About SvelteJS? (Video)
Tags: webdev, svelte, video, tutorial
Published: 2019-06-25 05:45:19

I noticed a lot of tweets lately regarding SvelteJS, so I thought – why not check it out and see what all the buzz is about? In this video I’ll go through the fundamentals of the framework and also show a simple live coding example using it.

- [Video on YouTube](https://youtu.be/NSA3_UgWwik)
- [Source code from video](https://github.com/valnub/svelte-counter-example)

What is your take on Svelte? Would you actually use it in a real project or is it to early?
Why I like my desk unorganised and messy
Tags: productivity, career
Published: 2019-06-25 05:01:45

There are tons of articles on the internet which boasts about how a clean desk can increase productivity. As a developer I never gave any serious thoughts about organising my workplace. As a matter of fact I like to keep my desk unorganised and messy. Surprised? Well, here’s what I think.

Different opinions
-------------------
When I look around me, I find people putting great efforts to keep their desk organised and clean. Minimal objects on surface, all accessories in proper place or maybe within one hand distance. I have even read articles where some people go long distances to completely renovate their entire study room, just to create their optimum work-space. All of these so that they can concentrate and focus entirely on their task.

When I get to my desk I just sit and start working. I don’t care what’s lying around, it doesn’t bother me. I don’t need a clean desk to start my work, I just need my laptop.

Ok. But still Why unorganised?
-------------------------------
Now, you may say I can clean my desk sometimes, right ?

Well, for starters ever since I have started working with a desk, I have kept it cluttered and since then it has become more of a habit. Even if I or my girlfriend manages to clean it, I end up putting stuff around my machine and make it messy again. Somehow, whenever I see empty spots on my desk I want to fill it immediately.

Another reason being, as a developer we tend to figure out our programming codes by staring into blankness. I have a habit of staring and fiddling with stuff kept around.

Clean desk != productivity
---------------------------
No matter what others preach, at the end of the day it really comes down to every individual’s interests. There’s no strict rule that you will only be productive if your desk is organised and clean. I spend much less time on cleaning and get straight to work. This has been working well since last 6 years or so.

I am also not used to working with extra monitors, just one laptop works for me. My macbook air works super fine no matter where I work. As I said I just need a laptop to start my coding.


Are you a developer or writer? How do you keep your desk?

----

This article was originally published on my [Medium](https://medium.com/@kanurag/why-i-like-my-desk-unorganised-and-messy-373ee61bfe0b)
What Is The Difference Between Web Design & Web Development
Tags: webdev, php, javascript, python
Published: 2019-06-25 03:38:21

In this article, we are going to discuss the difference between Web Designing and Web Development.

Web Design and Web Development, these are 2 separate roles in the website creation process. web design involves creating what the website should look like and how it should work, and web development involves developing a website bring it to life as a functioning website.

Web Design
Designing a website involves taking brief information that a client wants to be displayed on a website, Creating mockups and working out the best structure for it.

Web designers think a lot about the website to make it creative, and arrange the information in an innovative way, that means they see the right content at the right place.

part of the design process is called user experience or UX as you may have seen it referred to as, but designers are obviously also responsible for the visual look and feel of the website, and that’s called the user interface, or UI.

What a website looks like is really important because you have to make sure that the design layout in with the company’s brand, and also that the information is easy to read and consume,

There are many different pieces of software (Adobe Photoshop, Sketch, Pixlr, etc) out there which could be used by a website designer to design a website.

Web Development
As mentioned earlier, Web development involves taking the mock-up and bringing it to life through code so that it functions as a live website that you can put on the internet for people to use.

The base of a website is created using HTML, which organizes the structure of the site in code and then CSS is used to style the HTML, that base structure, to make it match the colors and shapes of the design that the designer created.

There are many different programming languages and not every web developer is going to know them all. They’ll generally have their own few that they specialize in, but HTML and CSS are the basics that you start with. Developers are responsible not only for making sure that the site functions properly and matches the design, but also that the code is written cleanly, so it can load really quickly for the user. And usually, developers will use a text editor to write and edit their code.

The bottom line is, Designers need more of an understanding of design principles and creativity to come up with the layout that is unique and answers the client’s brief and Developers focus more on logic-based thinking and an understanding of how code and technology works.
Making Google Analytics work from your browser plugin
Published: 2019-06-27 06:44:38

---
title: Making Google Analytics work from your browser plugin
published: true
tags: 
canonical_url: https://kambanthemaker.com//posts/google-analytics-on-browser-plugin/
---

Google Analytics may not work as it is if you want to get it working from your browser plugin due to security limitations and protocol conflict. To resolve it, follow the steps explained below,

## Manifest

First step is to get your manifest file allow GA domain.

```
"content_security_policy": "script-src 'self' https://www.google-analytics.com; object-src 'self'"
```

## Installing GA

```
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', 'UA-YOUR_ID-1', 'DOMAIN_NAME');ga('set', 'checkProtocolTask', null);ga('send', 'pageview', 'user');
```

`ga('set', 'checkProtocolTask', null);` line is important as it makes GA ignore the protocol check. This was causing me a lot of trouble. See here [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks)

DOMAIN\_NAME is also important, as GA can't detect that for your plugin. Set that to your domain name you want to track!

## Debugging

GA has a hidden gem, instead of `https://www.google-analytics.com/analytics.js` just use `https://www.google-analytics.com/analytics_debug.js` which will print useful debug messages on the chrome console!

![GA](https://i.ibb.co/XVv0gVk/Screen-Shot-2019-06-25-at-8-59-16-AM.png" alt="Screen-Shot-2019-06-25-at-8-59-16-AM")

Refer [Debugging](https://developers.google.com/analytics/devguides/collection/analyticsjs/debugging)
Thing that doesn't scale but I do it anyway
Tags: cool, little, trick, devjournal
Published: 2019-06-25 03:10:59

---
title: Thing that doesn't scale but I do it anyway
description: 
published: true
tags: cool,little,trick,journal
---

[Journaling](https://getlifeyoudesire.com/20-bullet-journal-hacks/). Tried a lot. I used all sorts of open source projects, Android apps, built my own scripts in Javascript, then Python, then Go, with all the
nice things that [the little voices told me to do](https://imgur.com/gallery/aXPas), like "sync with that
service", "use that database", "you can make things more decoupled this way", etc. All of it worked. How many entries my journal(s) had? **None**. I essentially built things that became trash as soon as they appeared in the file.

This works, though:
```
#!/bin/bash
nvim + +put_ +'r!date' +put_ +startinsert /my/home/my/file.md
```

We can translate this command as:
- go to the end of the file, 
- new line, 
- add the current date, 
- new line, 
- leave the editor in insert mode. 

Put it in a file, called it `tj`, gave it a little `chmod +x` sauce, and now my thoughts are stored nicely in a file. And I actually use it, almost everyday. `nvim` is for [neovim](https://neovim.io/), btw.

With time, the `file.md` becomes something like this:
```
Mon 24 Jun 2019 11:23:34 PM -03
this is the first

Mon 24 Jun 2019 11:26:45 PM -03
now the second

Mon 24 Jun 2019 11:26:56 PM -03
you get the idea
```


## Bonus - a fancy "popup" in i3-gaps

I use [`i3-gaps`](https://github.com/Airblader/i3) and wanted to make things "more interesting", so I added two
lines in my `~/.i3/config`:

```
for_window [class="^floatingVim$"] floating enable
bindsym $mod+q exec "termite -e tj --class floatingVim"
```

Now when I press `Super+q` a new [`termite`](https://github.com/thestinger/termite) window is launched as a floating
little square in the middle of my screen with `tj` ready for me to write
something.
Last Week To Submit A Proposal
Published: 2019-06-25 03:04:23

You have one week left to [submit your proposal](https://devfestwi.com/blog/posts/call-for-proposals/) to DevFest WI! The CFP closes at midnight Central Time on June 30.

We are still accepting any and all submissions, but we are particularly interested in 10-minute presentations on the following topics:

- Accessibility
- Diversity and inclusion in tech
- Machine learning
- Security
- Testing/QA

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).

Proposals need not be related to Google products.

Questions? Email us at contact@gdgmadison.com.
Documentation automation II
Tags: workflow, productivity, documentation, discuss
Published: 2019-06-25 02:58:36

---
title: Documentation automation II
published: true
description: What I found out, discovered and built after a few weeks of exploring the subject
tags: workflow, productivity, documentation, workflow, discuss
---

Hi devs,

A few weeks ago I created this post:

https://dev.to/elcotu/documentation-automation-p8m

After a few weeks, I thought it could be useful to share what I've been trying, exploring and building with the intent of automating some documentation workflow.

At first, I've been learning about markdown as it seemed to be a good language to create the documentation source.
Then discovered the [Pandoc](https://pandoc.org/) tool. It's an open source aimed to translate docs from markdown to several formats (*.docx, *.odt, *.pdf, *.html, *.epub and many more). This was practically all I needed, but, how to implement it?

The tool is suitable for Linux and Windows. I'm a newbie on Linux, I have to confess. But with testing in both OS I soon discovered that you can do a lot more in command line with Linux than with Windows (yes, many will think, "of course").
So I started creating git projects with markdown documents, and trying to automate document generation. Sooner or later, I got to a series of use cases for the automation:

- **A file for each subfolder**: Create a docx file with table of contents from the contents of every file in every subdirectory of the current working directory. This is meant to handle the generation of a collection of how-to files, each with a subfolder of images

- **Filtered doc**: Create a docx file with table of contents from the contents of every file in a directory that contains a given string, and then publishes it in a folder in Dropbox. This is meant to compile a single file with all approved or requesting for approval files

- **Change control**: Traverse a directory. Create a file named cdc.md with each file's commit log. Then create a *.docx file with the contents of the original file and the cdc.md file appended at the end of it. This is meant to create doc files with revision history, for compliance with ISO procedures

And then all the cases could be used with other output formats.

Then I thought and worked on the next step. Basically, publishing the file somewhere. Like a Dropbox, FTP or wherever one can share static content.

This is a repository where I'm compiling some Pandoc samples: [Pandoc samples](https://github.com/dcoturel/pandoc-samples)

Have anyone worked with such a tool or these requirements in any way?

Saludos,
Why isn't our world more accessible?
Tags: a11y, webdev
Published: 2019-06-25 01:49:47

---
title: Why isn't our world more accessible?
published: true
description: Slow down, look around.
tags: a11y, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sbqg8qdag2tae28cwllg.jpg
---

Next time you walk around some city streets, take a look around.

What's the sidewalk like? If it's made out of bricks, does it look very smooth or are probably half of them loose and uneven? When you come to an intersection, does the ramp to the crosswalk smoothly meet the street? And how about the street between sidewalks? Are there potholes or is the road nicely paved?

If there are stores and restaurants, are they at the ground level or is there a step or two or more to get inside? Are there buttons to activate the doors? When you're in the seating area, are there any booths or extra sets of tables that have steps to get to? If the restaurant has a patio, how much space is there outside of the railings surrounding that area? Is it large enough for a wheelchair going in one direction and a person walking in the other?

These are some of the thoughts that have gone through my head over the past few days. It's actually pretty appalling, the quality of some of our sidewalks and crosswalks. These are just the visible issues most people could see if they'd just stop and look.

Can you imagine what accessibility issues exist that aren't as visible?

---

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/9FfJW5Tu_qk) by [Rikki Chan](https://unsplash.com/@rikkichan89) on [Unsplash](https://unsplash.com).*
tcpdump cheat sheet
Tags: tcpdump, networking
Published: 2019-06-26 02:38:04

---
title: tcpdump cheat sheet
published: true
tags: tcpdump,networking
canonical_url: https://dannypsnl.github.io//tcpdump/networking/2019/06/25/tcpdump-cheat-sheet.html
---

tcpdump?

A command line tool for analyzing network packets.

How to get packets?

Using `-i` option, `tcpdump -i <device-name>`, you would get the packet through NIC(network interface card) named <device-name>.</device-name>

How to get `<device-name>`?

using `ip link` could get some, e.g.

```
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:01:37:d1:9c:bd brd ff:ff:ff:ff:ff:ff
$ tcpdump -i eth0
```

Now I know how to get all packets through certain NIC, but I want to analysis specify connections, how can I get it?

Expression.

What Expression?

tcpdump expression.

What is tcpdump expression?

A set of combinable rules, for example `src 10.0.0.10` means only the packets from `10.0.0.10` would show.Here is a list(incomplete) of tcpdump expression, the `#` leading comments:

```
host 10.0.0.10 # from or to 10.0.0.10
port 23 # contains port 23
dst 10.0.0.10 # as src, but for destination
# Protocols
arp # only ARP
icmp
tcp
udp
fddi
ether
# Protocol logic is simple, is not, for all
```

You say they are combinable, how they combined?

Good question, they can be combined with `or`, `and` or with leading `!`(not); `or` is `or`, not `and`, for example, `src 10.0.0.10 or src 10.0.0.11` is for packets from `10.0.0.10` or `10.0.0.11`, obviously.

I found packets not showing all informations I want, what could I do?

Simple, tcpdump has `-v` for verbose output, `-vv` for more verbose, `-vvv` for even more verbose. `-vvvv` for… no, I’m kidding.

Ha, that’s funny, and the timestamp is not readable for me, how to make it more friendly?

Use `-t`, and not kidding, use `-ttttt` for maximally timestamp, and you have `-kt, k <- 1..=5` for different level output.

I found the IP be replaced by host name but I don’t want it, how to remove it?

`-n` would tell `tcpdump` stop convert address.

What if I want to save my hard working result?

`-w <filename>` is what you’re looking for, it would write the raw packets to file named `<filename>` rather than parsing & printing. And remember you can record packets into a file, and use **[Wireshark](https://www.wireshark.org/download.html)** to analysis it! For complex flow analyzing, I would do that. Now, the most important path already covered, you can always get more & fresher information about it from `manpage` of `tcpdump`, good lucks.

#### references

- [wiki: NIC](https://en.wikipedia.org/wiki/Network_interface_controller)
- [man: tcpdump](https://www.tcpdump.org/manpages/tcpdump.1.html)
Storing Local Data with Javascript
Tags: help, javascript, localstorage, discuss
Published: 2019-06-25 00:22:56

---
title: Storing Local Data with Javascript
published: true
tags: help, javascript, localstorage, discuss
---

I'm trying to store a table's data locally. I'm a bit confused about where I should store the cells; in an array? Will the array return each cell in the correct row index? How should I set the local data variable if I'm passing rows and a table as the arguments?

In my code, the table creates a new row from user input. When I refresh, the table goes away. I'd like to keep the table from the previous session. 

Here's what I have so far:
(press the play button to run the code)


{% replit @njericooper1/table %}
What was it like writing code for your first project?
Tags: discuss
Published: 2019-06-24 23:34:32

After two months of learning code, I've finally completed a project, a rough looking website with a form to fill.

During the life cycle of this entire project, I questioned my ability as a web developer and felt as if I forgot to sacrifice a virgin to the coding Deities.

It was a fun experience, so I wanted to see if others have had similar challenges and how they went about overcoming them. Feel free to comment below.
Rocketsam - a CLI to create and deploy microservices in AWS
Tags: aws, opensource, microservices, node
Published: 2019-06-24 22:45:41

Hi everyone!

I recently published a new cli called Rocketsam which helps create and deploy microservices to AWS using SAM local, while introducing new features such as:

Caching per function (deploying only modified functions)

Support installing dependencies in nodejs and python 3 using ubuntu docker image

Fetching API urls and live logs from cloud watch for each function

Sharing code between functions

Template per function instead of one big template file

https://github.com/nadav96/rocketsam

The development started from my frustration using either Serverless or AWS SAM local cli

Please let me know if you found this helpful :)
Rocketsam - a CLI to create and deploy microservices in AWS
Tags: aws, opensource, microservices, javascript
Published: 2019-06-24 22:34:33

Hi everyone!

I recently published a new cli called Rocketsam which helps create and deploy microservices to AWS using SAM local, while introducing new features such as:

Caching per function (deploying only modified functions)

Support installing dependencies in nodejs and python 3 using ubuntu docker image

Fetching API urls and live logs from cloud watch for each function

Sharing code between functions

Template per function instead of one big template file


https://github.com/nadav96/rocketsam

The development started from my frustration using either Serverless or AWS SAM local cli



Please let me know if you found this helpful :)
Hiring Full Stack Engineers in NYC
Tags: python, react, aws, career
Published: 2019-06-24 22:30:11

We're looking for full stack engineers in NYC to work alongside our founding team (ex YC, Stanford CS, HBS) to help solve mental health’s affordability crisis.

To scale our vision, we just raised our latest round from Accel, along with the founders of Seamless, One Medical, and Flatiron Health.

You will work with our Head of Engineering to build and lead an engineering team as it grows from one to four within the next few months.

You should have experience building things from the ground up.

Bonus points for expertise in Python & React.

[Full job description and applications accepted here!](https://angel.co/company/headway-6/jobs/428541-software-engineering-lead-back-end-full-stack)
How are people keeping track of their #AWS Reserved Instances purchases?
Tags: aws, discuss
Published: 2019-06-24 22:19:36

---
title: How are people keeping track of their #AWS Reserved Instances purchases?
published: true
description: 
tags: #aws, #discuss
---

I'm curious to learn how folks keep track of their RIs. 

* What number do you keep an eye on and how? 
 * RI Utilizations? RI Coverage?
* Do you use any scripts or tools to do so?

Looking forward to learning new tricks