teleren/devto huggingface dataset:
Day-11: Read Info-sec Write-Ups!
Tags: cybersecurity, security, blogaday, infosec
Published: 2020-06-27 17:20:28

**Day-11:** Did Unix badge exercise on Pentesterlab and was not in the mood to do research so did read some amazing info-sec write-ups! Understanding and reading other's methodology always helps you make your thoughts broad!

#### 1. **Access to Server and Database of a French Bank** **💸** ~ **Thibeault Chenu!**

- Understanding the structure of Target is Important!
- This was pretty good but I guess I need more knowledge to understand this completely if you can help, lemme know in the comment section! Thanks!❤️

#### 2. **Getting First Bounty with IDOR** ~ **Mukul Trivedi**

- Idor's are great when you get the logic errors!
- He also linked amazing blogs about IDOR in his blog, do not forget to check that out also!

#### 3. **How Inspect Element Got me a Bounty** ~ **Aditya Soni**

- Make Inspect Element your best friend! 
- Idk I never tried to change value which is disabled by default! Nice catch though!


PS: It is pretty easy to understand, If you do not understand lemme know in the comment section, I'll help you!

---

# **Resources:**

**Medium Blogs:** 
1. https://medium.com/bugbountywriteup/how-did-i-get-access-to-server-and-database-of-a-french-bank-6bab0ed30463
2. https://medium.com/bugbountywriteup/all-about-getting-first-bounty-with-idor-849db2828c8
3. https://medium.com/bugbountywriteup/how-inspect-element-got-me-a-bounty-58d3a9946225




# **Contact:**

Got doubts? Contact me on [Twitter](https://twitter.com/FenilShah1616). 
Feedbacks are welcomed, do comment it down below! :)
Un programador con dolor de cabeza es un dolor de cabeza
Published: 2020-06-27 17:12:27

##7 am 

El clima está bajo cero el sprint del día debe completarse si o si para continuar con la siguiente fase del proyecto, el único inconveniente el dolor de cabeza más fuerte del año, ese sin duda alguna debería ser el momento perfecto para detener todo y descansar pero desde luego esa es la última de las ideas que pasa por una cabeza adolorida y atareada.

##9 am 

Refeactorizas por cuarta vez el módulo que bajo otras circunstancias escribirías con los ojos cerrados la música dupsted a todo volumen en los auriculares no mejoran la situación.

##11 am 

El pull request está listo pero no pasa las pruebas de integración, notas que todo a tu alrededor tiene más brillo de lo normal y sientes que puedes escuchar hasta el aleteo de una mosca, entonces sales corriendo a una farmacia y tienes la peor idea posible: "pedir el calmante más fuerte para el dolor de cabeza", sin perder tiempo y sin previamente haber leídos los efectos secundarios ingieres la pastilla mágica y diez minutos después sientes que puedes sentir la música el ritmo de tecleo se hace más y más lento para finalmente sentir que eres uno con la fuerza.

## 3 pm 

Una notificación de slack te saca del letargo, es el team lead que te informa que llevas una hora de retraso en la entrega escribes que tuviste una emergencia y pides un plazo de dos horas para arreglar errores.

## 5 pm 

Las pruebas de integración son exitosas, el dolor de cabeza es historia y con un reporte de retraso de entrega terminas el día en una cafetería engullendo cuarto menú como si no hubieras comido en una semana ( efecto secundario ).

##Moraleja 

**Un programador con dolor de cabeza es un dolor de cabeza**
si un día te levantas con el dolor de cabeza del año, deja todo por unas horas y descansa.
Software War (Keith Curtis)
Tags: movie, software, war, debian
Published: 2020-08-26 00:58:15

---
title: Software War (Keith Curtis)
published: true
date: 2020-06-27 07:34:00 UTC
tags: Movie,Software,War,Debian
canonical_url: https://robbinespu.gitlab.io/blog/2020/06/27/software-war-keith-curtis/
---

Hello there! Do you know who Keith Curtis? If yes then good! If no and you are someone who using opensource software then you should get to know who are this guy.

I never meet him personally but I my love with linux start with Debian and I like to read his [blog](https://keithcu.com/wordpress) about debian, opensource vs proprietary software, questioning about Ubuntu existant etc (which is how this thing lead me to his weblog 10 years ago).. I just silent reader, I read this articles including everyone comments which I believe everyone have they own implicit objective and mutual objective for everything about IT.

Ok, sorry for the crap introduction taking too long. Today, I visited his weblog and found out he releasing “**[Software Wars, the Movie](https://keithcu.com/wordpress/?p=4041)**”.

You can download the torrent file [HERE](https://video.detroitquaranteam.com/download/torrents/07696431-2f2d-4926-a429-29ac9c7d22b1-1080.torrent) or watch it on the Peertube that he already setup.

<center>
<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.detroitquaranteam.com/videos/embed/07696431-2f2d-4926-a429-29ac9c7d22b1?warningTitle=0&amp;start=3s&amp;subtitle=en" frameborder="1" allowfullscreen=""></iframe>
</center>

P/s: If you wonder which articles lead me to his weblog 10 years ago..then let me tell you. That articles was “[Should Ubuntu Have Been Created?](https://keithcu.com/wordpress/?page_id=558)”. From the title itself you can already smell how controversial yet so brave. Even [Mark Shuttleworth](http://www.markshuttleworth.com) come and [leave a comment](https://keithcu.com/wordpress/?page_id=558#comment-26092) there.
Liquid Button in Flutter
Tags: codepen, flutter, dart
Published: 2020-06-27 17:01:28

Hey, Check out my Experiment for Liquid Button in flutter.

{% codepen https://codepen.io/iamSahdeep/pen/GRovBMO %}

If above preview is not working, link to pen is https://codepen.io/iamSahdeep/pen/GRovBMO
And it only works on laptop or pc.
Tutorial on writing 10 Hello World programs in 10 languages in 2ish minutes (more like 12ish...)
Tags: tutorial, beginners, helloworld
Published: 2020-06-27 16:51:24

Hello World Tutorial: https://youtu.be/eohV_h0wJ0o

I might start a new project called: Two Minute Projects. Here is what I've made so far. Not sure if I'll make more yet or not.

The goal would be to create super quick and helpful tutorial videos. It could be fun. Thoughts?
Productivity: Is Instagram overrated?
Tags: watercooler, productivity
Published: 2020-06-27 16:47:27

**TLDR**: After spending lots of time on platforms like [LinkedIn](https://www.linkedin.com/) and [Dev.to](http://dev.to/), I just feel [Instagram](https://www.instagram.com/) is overrated. Scrolling through memes the whole day just kills your time, and should be spending it on something productive. (no offense to Instagram :p)

A few months back, I started my day with Instagram and ended with it. Updating stories, making posts, commenting on posts, sharing memes, and whatnot.

I just loved the kind of validation I got from that app. I should rather say I got addicted to **instant gratification**.

It was until one day when the panic monster hit me and realized how much time have I really got and how I was spending it. I had a lot to catch up before I face the reality of life. That was the day I decided to change myself. Broke that barrier in my life that was not letting me grow.

It was hard initially to not open that app and check for notifications every few minutes. I overcame that, and I am glad about it.

That was the time I started exploring a few other platforms like dev.to and Linkedin. I loved how the people on these platforms were helping each other grow, and I should say I am addicted to these.
(in a good way :p)

Today, I barely open Instagram and don't care as much as I used to do. I have overcome my craving for instant gratification and have started to work on my long term goals (for delayed gratification) that will one day be all worth it.

if Instagram is not overrated, then why do people end up using it for hours when instead they can be doing something else that could be more productive? 

What do you think?
Using unit and integration tests in Jest
Tags: javascript, showdev, testing
Published: 2020-06-27 16:42:16

---
title: Using unit and integration tests in Jest
published: true
description: Use separate config files.
tags: #javascript #showdev #testing
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/j4r8tsfiybigfvyikl4b.png
---

I was trying to use [jest-puppeteer](https://github.com/smooth-code/jest-puppeteer) with monorepo project [i'm working on](https://github.com/jalal246/dflex) in roadmap aiming to add integration tests using `puppeteer`.

And honestly, I didn't have any idea how to load different `jest.config.js` for different packages I already have in the monorepo.

----

In case anyone stuck in the same problem as me. The simple solution is to separate the unit test from an integration test. Obvious? didn't seem so for me.

This "separation" should be reflected in the project structure, config files, and running scripts.

Of course, the main problem I faced here, is dealing with the switching environment. I use `testEnvironment: "jsdom"` and to run `puppeteer` you have to remove any testing environment and use `preset: "jest-puppeteer"`.

Lesson 1: You can't run all tests at once.
Lesson 2: It doesn't matter if you are using monorepo or not.

So, I ended up with the following structure:

```
myProj1/
  src/
  test/
    integration/
      myFrist.test.js
    foo.test.js
    bar.test.js
  package.json

myProj2/
  ...
myProj3/
  ...
jest.config.js
jest.integration.config.js
package.json
```

What's in config files?

Well, not much at all. 

In `jest.config.js`, the main goal is to exclude the integration test.

```js
module.exports = {
  testEnvironment: "jsdom",
  testPathIgnorePatterns: ["test/integration"],
};
```

Inside `jest.integration.config.js`, make sure to test only the integration files.

```js
module.exports = {
  preset: "jest-puppeteer",
  testRegex: "/integration/",
};
```

And finally inside root `package.json`:

```js
"scripts": {
   "test:unit": "jest",
   "test:e2e": "jest -c jest.integration.config.js",
   "test": "yarn test:unit && yarn test:e2e",
 },
```

Using `jest -c` to pass a custom config for Jest. Since I have `jest.config.js` for the unit test there's no need to pass one, Jest will automatically read it. But that's not the case for `test:e2e`.

Eventually, the `test` script will run both integration and unit tests.

![show test](https://dev-to-uploads.s3.amazonaws.com/i/iayi7goirfreyl2e9wsr.gif)
Avalonia UI on Ubuntu: Getting Started
Tags: avalonia, ubuntu, dotnet, ui
Published: 2020-06-27 16:39:41

[Avalonia UI](https://avaloniaui.net/) is a cross-platform UI framework available for Dotnet Core. It is a project part of the .Net Foundation. Its main appeal is to provide the ability to create desktop applications for Windows, Linux and MacOS with a single code base.

In this tutorial we will see how to install the Avalonia templates and create a blank application.

## Installing templates

The first thing we need to do is installing the Avalonia Templates so the **dotnet new** command could use them when creating new applications.

You need to go to the following Github Repository [Avalonia Templates for dotnet new](https://github.com/AvaloniaUI/avalonia-dotnet-templates) and download the zip version. Alternatively, you could clone it to your machine if you have git installed.

![Avalonia templates Github Repo](https://dev-to-uploads.s3.amazonaws.com/i/ri30y569bk9ta6sdaf92.png)

After you have unzipped the file in the location you prefer. It is needed to run the following command. Keep in mind the path you need to use is the route to the unzipped templates

```
dotnet new --install [path-to-templates-folder]
```

> Tip: An easy way to add the folder path to the command line is to drag and drop the folder from the File Explorer

![Drag and drop folder to the terminal](https://dev-to-uploads.s3.amazonaws.com/i/7sa75gtvkad9nl7c8u61.png)

## Creating an Avalonia application

The command executed on the previous step adds a few more templates to the `dotnet new` command.

There are two project templates added are the following:

* **avalonia.app:** To create a barebones Avalonia application
* **avalonia.mvvm:** To create an application that uses the Model-View-ViewModel pattern with ReactiveUI

To create a new application you need to run the following command:

```
dotnet new avalonia.app -o MyApp
```

Where `MyApp` is the name of the application we are creating.

## Running the application

To run the application you need to get into the MyApp folder

```
cd MyApp
```

and then run the app with the dotnet CLI

```
dotnet run
```

The result will be the following as a blank app shows on screen.

![Blank Avalonia App](https://dev-to-uploads.s3.amazonaws.com/i/hd44iiawhwhsro2wyt2g.png)

I hope you find this useful. In following entries we will continue exploring the Avalonia UI framework.
When to leave a job?
Tags: discuss
Published: 2020-06-27 16:21:28

Everyone talks about how to get a job and how to keep the job. Today I would like to share my view on when to leave a job. To many, it is a very intuitive topic, but I like to put things in a logical order. Here are some signs that should be a good reason to think about leaving. 

> Respect, Payment and Learning opportunity (`RePL` in short 😉).

**Respect:** There could be two different levels of respect. First one is personal respect. If one notice a lack of personal respect in the company, then it should be a good sign for the person to look for a new job. The second type of respect is the respect to the job. If the company does not respect the job they are doing, that should also be a good sign (I mean bad sign). How can a company disrespect the job they are doing right? Well there could be tens of ways. Say your company does not follow standards and good practices, they don't care how you code, rather they just want to finish and pass. One should watch out for those signs.

**Learning Opportunity:** I personally feel very exhausted if I cannot learn on a regular base. Learning does not only give someone pleasure and relief but also increase his value in his field. If your job is not letting you learn, you should start considering a new job.

**Payment:** Finally if your company is paying you way less than your current market price, you should look for a new job. Either they don't know your value or worst they don't see your value. In either cases, you should look for an upgrade. (Of course, there could be exceptional cases where the company is going through bad time.)

⚠️ Watch out for `RePL`!

Those are the signs that give me hard time to continue in a job. Feel free to agree/disagree. Have a great day 👋
Why I wrote a Password Manager and what I've learned
Tags: android, webdev, security, yearinreview
Published: 2020-06-27 16:19:30

Longtime reader, first time writer :)

Some years ago as a recent graduate of university, I was working for Citrix in my first serious position of employment, updating the installers for their XenClient XT product (now OpenXT). Smart phones were beginning to truly reach their stride in how useful/powerful they could be. Advertisers were toying with interactive ads via the use of NFC & QR codes. And a recent move from academic pursuits into working on a security based project got me thinking...

"I wonder what it would take to log in with a QR code?"

I scratched down some ideas, looked into it a little from a feasability perspective and then quickly forgot about it. I had a job, other things to do/not much time and a lack of confidence in my ability to build what I'd need. Aside from sitting in my list of "ideas I once had" and occasionally reminding me of that time I thought "It would be cool if..." the project was on ice for a few years.

Then came a period of unexpected unemployment. For the first time in a long time I had a large window of time with no plans on how to use it. I found myself once again looking at my list, but this time with the idea of shortening it instead of lengthening it.

Out of all of the terrible/good ideas in the list the QR logon app caught my imagination again. How many times had I been in a hostel over the last few years using one of their computers lamenting the fact I had no good password management solution?

By the time I had my next professional project lined up, I had used the experience gained over the previous years to build a working prototype - an idea made reality, ready to use whenever I wanted!

The next goal was to refine until I felt ready to share my idea with the world. This part was probably the most difficult! Finding a balance between wanting your release to be perfect & knowing which problems actually don't need to be fixed is no easy task. Nor is balancing professional and personal projects time wise!

But today as I write this, [QRGoPass](https://www.qrgopass.com/) is live. 7 people in the world are using my app and I couldn't be happier with this little success.

TL;DR:
- Keep a list of your ideas - it's great for nostalgia and you never know when you might find yourself with the time and skill improvements needed to implement one!
- Be persistent - small progress is still progress, give it time and you'll eventually succeed
- Target a minimal viable release - learn how to say "good is good enough"
Run Python and C++ code directly from Sublime Text (Using Terminus and Origami)
Tags: sublimetext, python, cpp, ide
Published: 2020-06-27 16:16:24

Sublime Text 3 is my editor of choice, but it has bugged me for a long time that it doesn't come with an integrated terminal. That's why I switched to Visual Studio Code for a long time. But the background processes of Visual Studio Code drain my laptop's battery faster than any other text editors. Though it was better at linting and autocompletion , I like lighter text editors otherwise I would be using IDEs like Pycharm or Clion.

#Install Terminus
That's where Terminus (A sublime text plugin) comes in. This plugin allows us to use a fully functional terminal inside Sublime Text. Lets install this plugin and see what is does. Open Command Pallet (Ctrl + Shift + P) and select "Package Control: Install Package". Search for "Terminus" and let it install. It might require a restart. So, restart Sublime Text and try to run it from Command Pallet(Ctrl + Shift + P) by searching "Terminus: Toggle Panel". This will open a terminal right below the active tab. 

#Install Origami
Now, for the second plugin, we install Origami. Origami is a powerful tool, which allows to open panes at various sides of Sublime Text. You can experiment with origami from the command pallet. We will use this plugin to run the terminal from a shortcut. Use Command Pallet(Ctrl + Shift + P) "Install Package" to install Origami.

#Python and C++ integration

1. Preferences -> Package Settings -> Terminus -> Key Bindings
2. A new Sublime Text Window will pop up. The new window has two panes. We will work with the right pane (which might be empty in your case)
3. Now paste the following code in that pane
For Linux:
{% gist https://gist.github.com/Sohaib03/969d432349f3a7a74cbfe460c78674e6 %}
For Windows:
{% gist https://gist.github.com/Sohaib03/f0e4b42013199f8ab463dc8e7ae31e5e %}
4. Now save the file.

Now your setup is complete. Press F6 to run a Python File and F8 to compile and run a C++ file. Additionally, 'Alt+`' will open a terminal in the active window.


Feel free to comment below for any help.
ลดขนาด tailwindcss ไฟล์ด้วย Purge
Published: 2020-06-27 15:57:04

---
title: ลดขนาด tailwindcss ไฟล์ด้วย Purge
tags: tailwind, tailwindcss, purgecss, web
published: true
description: tailwindcss เป็นของดี มีปัญหากวนใจอยู่อย่างเดียวคือขนาดไฟล์ที่มันสร้างออกมาค่อนข้างใหญ่เกินความจำเป็น แต่ตอนนี้เราสามารถลดขนาดไฟล์นั้นได้อย่างง่าย ๆ ด้วยการ config Purge option
tags: 
cover_image: https://tailwindcss.com/img/twitter-large-card.png
---

[tailwindcss](https://tailwindcss.com/) เป็น css framework ที่ช่วยให้เราเขียน css ได้ง่ายและรวดเร็วโดยไม่ถูกตีกรอบเรื่อง design กำลังได้รับความนิยมอย่างมากในปัจจุบัน

แต่ข้อเสียสำคัญของ tailwindcss ก็คือขนาดไฟล์ที่ใหญ่มาก ประมาณ 1-1.2MB ถ้าไม่ตัดอะไรออกเลย วิธีแก้ก่อนหน้านี้คือการใช้ [PurgeCSS](https://purgecss.com/) ในการตัด class ที่ไม่ได้ใช้ทิ้ง ซึ่งก็ไม่ได้ยากอะไรแต่ก็ต้องยุ่งยากขึ้นในการติดตั้งและ config ตัว PurgeCSS ให้ทำงานได้ถูกต้อง

คนทำ tailwindcss เขาก็รู้แหละ ใน version 1.4 เป็นต้นมา เขาก็เลย built-in PurgeCSS มาเลย! ทีนี้สบาย ง่าย จบใน config เดียว

ตัวอย่าง tailwind.config.js ที่เมื่อเราทำ production build (`NODE_ENV=production`) มันจะเข้าไปดูว่ามี class อะไรถูกใช้บ้าง (ในกรณีนี้คือเข้าไปดูใน elm ไฟล์และ HTML)

```js
module.exports = {
  purge: ["./src/**/*.html", "./src/**/*.elm"],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
};
```
เมื่อรัน build
```bash
➜ npx tailwindcss build src/index.tailwind.css -o src/index.css
  
   tailwindcss 1.4.6
  
   🚀 Building... src/index.tailwind.css
  
   ✅ Finished in 1.8 s
   📦 Size: 29.12KB
   💾 Saved to src/index.css
 ```
จาก 1.2MB เหลือแค่ 30KB เท่านั้นเอง

## ข้อควรระวัง

สิ่งที่ PurgeCSS ทำให้คือมันเข้าไปดูว่าใน source code เรามี class ของ tailwindcss อันไหนอยู่บ้างแล้วลบที่เหลือออกให้ แต่มันจะตรวจไม่เจอ ถ้าเราไม่ได้ใส่ชื่อ class ไว้แบบเต็ม ๆ

แบบนี้จะไม่เจอเพราะประกอบชื่อ class จากค่าคงที่
```elm
class ("bg-teal-" ++ shade) -- shade คือค่าน้ำหนักสี
```
แบบนี้ถึงจะเจอเพราะใช้ชื่อ class ของ tailwindcss แบบเต็ม ๆ
```elm
class
  (case shade of
    Light -> "bg-teal-200"
    Normal -> "bg-teal-400"
```
are there any basic web focussed graphic design tutorials or courses out there?
Published: 2020-06-27 15:30:14

---
title: are there any basic web focussed graphic design tutorials or courses out there?
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

I find the technical side of programming with React and other tools comes pretty naturally to me, especially with all the great articles here and elsewhere.

But... like lots of devs I struggle to make basic UI designs attractive. Does anybody know some good resources for learning about good colour choices, rounded corner radiuses or just the more fundamental parts of graphic design? I looked for a basic paid course that work could pay for but couldn't find anything
Interactive card carousel
Tags: codepen, webdev
Published: 2020-06-27 15:27:50

Greetings! This is my first code pen and dev post. I wanted to share with you this interactive card carousel. I looked around and couldn't find something like this, so I built it and now is available to anyone who is looking for a similar solution.

Hope you find this useful!

{% codepen https://codepen.io/dev_tom/pen/ExPvRqB %}
Launch an AWS Spot Fleet instance using Terraform
Tags: aws, terraform, devops
Published: 2020-06-27 15:25:00


Today, I share a way to launch an AWS instance using Terraform, which has following features: 
- Use EC2 Spot fleet instance which is cheaper than the on-demand instance.
- Use AWS Session Manager to connect to the instance, so that you don't need to prepare the SSH setting. Also you don't need any bastion host to connect the instance.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z3hlq18exu7vgncgs7t4.png)


### Example
You can download the Terraform code on my Github repository.
[Terraform example](https://github.com/syuren42/terraform-examples/tree/master/spot-ssm-example)


I made these code with Terraform version **v0.12.25**.


Download the repository and type following command.
```sh
$ cd terraform-examples/spot-ssm-example
$ terraform init
$ terraform plan -var-file=aws.tfvars
$ terraform apply -var-file=aws.tfvars
```

After that you can connect the instance via Session Manager console in AWS console.You find the way on following short video and AWS document.
 {% youtube GytEehnuzzs %}


### References:
[AWS EC2 Spot instance document](https://aws.amazon.com/ec2/spot/)

[AWS System Manager Session Manager document](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html)