teleren/devto huggingface dataset:
GitHub Workflow to Sync Branches
Published: 2022-04-14 16:55:57

---
title: GitHub Workflow to Sync Branches
published: true
date: 2022-04-12 00:00:00 UTC
tags: 
canonical_url: https://justin.poehnelt.com/posts/sync-branches-github-workflow/
---

## Problem

I have a GitHub repository using `main` as the default branch, but I am trying to integrate a third party tool (loading JSFiddle contents from GitHub) that has `master` hardcoded as the default branch.

There is an [issue in the tool](https://github.com/jsfiddle/jsfiddle-issues/issues/1665), but stale bot has killed it.

## Requirements

- Every push to main will also be applied to master.
- Both branches will share the same refs and tags.
- No workflows will execute on pushes to the `master` branch.
- No manual interaction is required (no pull requests).
- A maximum delay of only a few minutes.

## Implementation

Below is a simple GitHub workflow that pushes `main` to `master`. The key option to be aware of is the `fetch-depth` for [actions/checkout](https://github.com/actions/checkout), which fetches all branches and tags for the repository. The default is to only get the current branch.

> Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags. Refer [here](https://help.github.com/en/articles/events-that-trigger-workflows) to learn which commit $GITHUB\_SHA points to for different events.

```
# .github/workflows/push-to-master.yml
name: Push to Master
on:
  push:
    branches:
      - main
jobs:
  push:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Update master branch from main
        run: |
          git config --global user.name 'Justin Poehnelt'
          git config --global user.email 'jpoehnelt@users.noreply.github.com'
          git checkout master
          git reset --hard origin/main
          git push origin master
```

Depending on how you use GitHub workflows, you may also want to ignore the `master` branch. The following workflow will trigger on every branch except `master` using [branches-ignore](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore).

```
on:
  push:
    branches-ignore:
      - master
```
Service
Tags: hackwithdg
Published: 2022-04-11 23:54:28

<!-- Please delete anything appearing between angle brackets and create your own title before publishing your submission post.  -->

<!-- [Instructions]: # (To submit to the Deepgram Hackathon on DEV, please select the template that corresponds with the challenge you are submitting to and delete the content for the other submission type. You are encouraged to submit as many times as you would like, but please create a separate submission template for each project.) -->

<!-- ✨Pro Tip: You can link all of your submissions together by adding `series: {your series name here}` to each post in the header section – right between “tags” and “description. ✨ -->

— 

Direct output by site access
 
Recording source form
Query response information 

 
https://gist.github.com/musha635842/d081588cf2d03f0225c67d2fd57c93d3

<!-- [Template 1: Build Challenge]: # (Select this submission template if you have built an application using Deepgram for this hackathon.) -->
How I do remote administration using ngrok
Tags: devops
Published: 2022-04-19 10:40:29

---
title: How I do remote administration using ngrok
published: true
date: 2022-04-12 00:00:00 UTC
tags: devops
canonical_url: https://www.geewiz.dev/2022/04/12/remote-administration-ngrok.html
---

This month, a new intern from Spain started at my company. While we used to use Macbooks for our interns, he was the first to get a Linux laptop. Nothing fits the DevOps use case better, after all.

I set up the machine with Manjaro Linux in my office, but I had to solve the problem of later installing and upgrading software after the laptop was handed over. It’ll always access the internet from a private network behind a router, and therefore will not be visible for me from the outside. And I certainly don’t want to commute to Dublin, where we book a coworking space for our interns, every time maintenance is required.

In the end, I chose a minimalist approach by using `ngrok`. This nifty command line tool, paired with the online service at [ngrok.com](https://ngrok.com), allows developers to create network tunnels with an endpoint on the public internet. Its main purpose is for web developers to share access to an application running on their personal machine. In other words, it allows people with whom you share the connection details to connect their web browser to your development laptop, even if it’s inside a closed WiFi network. However, `ngrok` extends this functionality beyond the HTTP protocol and port 80.

When our intern asked me to install Discord and VS Code earlier today, I asked him to run a simple command and tell me the tunnel endpoint address. The command was:

```
ngrok tcp 22

```

It sets up the network tunnel as well as a local website on which it lists the details of each connection. Our intern then gave me the listed address `tcp://0.tcp.ngrok.io:14463`, from which I constructed an SSH command:

```
ssh -p 14463 geewiz@0.tcp.ngrok.io

```

Within a second, I was logged into his laptop. A few minutes of installing new packages and upgrading existing ones later, I was done and asked him to cut the connection. It doesn’t get much simpler than that, does it?
[Deepgram x DEV Hackathon Submission ] ⭐️
Tags: hackwithdg
Published: 2022-04-11 23:58:04

### Overview of My Submission
A minimalist React x Node.js proof of concept app using Deepgram's speech recognition API for my first DEV hackathon 🤓

### Submission Category: 

Accessibility Advocates


### Link to Code on GitHub

<a href='https://rebrand.ly/deepgram-project' target='_blank'><strong>GitHub Project Repo</strong></a>


### Additional Resources / Info

Screenshots available <a href='https://rebrand.ly/deepgram-screenshots' target='_blank'><strong>here</strong></a>
CSS Interview Question: Create Responsive Design (1 Column / 3 Column)
Tags: css, show, tutorial, programming
Published: 2022-04-11 23:49:04

I went on numerous job hunting 💼 this year and noticed that most of the interview questions revolve around javascript and it is totally understandable.😞 No CSS/HTML. 

Those other interviews that contain CSS technical questions 🤔, I was asked to write a responsive layout - 1 column for small screens and 3 columns for wider screens.

Just like any given problems, there are many solutions to this question. Hopefully, you do not present the old way of doing things which is to use table, or float like below 🚫. 


```css
// CSS Float
@media (min-width: 500px) {
  .column {
    width: 33.33%;
    float: left;
  }
}
```

My recommendation would be either css flexbox or grid which would like below.

```css
// CSS Flexbox
@media (min-width: 500px) {
  .columns { // parent
    display: flex;
  }
  .column { // child
    flex: 1;
  }
}
```

```css
// CSS Grid
@media (min-width: 500px) {
  .columns { // parent
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

```

CSS is a skill that needed by every front-end developer/engineer although it is not the favorite skill. One should be able to write elegant and minimal CSS rules. 

What is your take on this? Should CSS questions or challenges still be asked on a front end interview or we can assume that engineer should know it as it is not a programming language?

**Codepen:** https://codepen.io/collection/pgbEQM (If you want to play around these three approaches)

> For those who prefers video format
{% youtube https://youtu.be/9irWj9SrQDE %}
Captio: Video Subtitles in Different Languages
Tags: hackwithdg, javascript, programming
Published: 2022-04-11 23:41:00

### Overview of My Submission

Language has always been a barrier, but now, with recent technologies, we can translate live text in real time.

However, this does not apply to video; it is still quite difficult to do so. And I'm sure we've all been in a position where we've seen a video clip on the internet (usually with a lot of interaction) and couldn't get the gist of it because it wasn't in our native language. Captio solves this barrier.

> Captio is a powerful bot that will generate subtitle for video files in any preferred language. Available via the following medium:

- Twitter Bot - Twitter is inarguably one of the most used social media platform in the world, and it does make sense that a technology like this one is available on there.
Check out [caption on Twitter](https://twitter.com/generate_sub/with_replies).

- CLI Application - Captio is also available as a CLI application, so that you are able to generate translated subtitles offline.

### Submission Category:

Accessibility

### Link to Code on GitHub

{% github https://github.com/AsaoluElijah/generate-sub %}

### How it works
Behind the seen, Captio uses a lot of open source API to perform it's operation, the diagram below sums it up pretty much.

![How it works](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ax3aig3lz5bsk11idmnj.png)

Nevertheless, you can checkout the full information on how it works [here](https://github.com/AsaoluElijah/generate-sub)

### Usage
On twitter, to let captio generate translated subtitle for a video tweet, you'll only need to reply the tweet mentioning captio (@generate_sub) like below:


![Captio usage on twitter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6b8u76xmn607cwxec1ql.png)
Simple JS thread optimization using Partytown (Web Workers)
Tags: javascript, webdev, react, tutorial
Published: 2022-04-11 22:09:42

## Javascript Thread

Javascript is a single-threaded language which means it has only one call stack that is used to execute the program.

In simpler terms, this means that only one line of code can be executed at a time.

While you most likely won't notice this as an issue whilst developing simpler apps, once you start adding 3rd party libraries such as Google Analytics, Intercom or other heavy packages that are not required to be in the critical path you will probably notice the main thread starting to clog up.

This will cause your app to slow down, which leads to bad user experience, and higher churn rate.

## Web workers

As per MDN definition, web workers are means for web content to run scripts in the background threads, thus offloading the main call stack.

They are capable of performing tasks without interfering with the use interface, and can perform **I/O** using **XMLHttpRequest**.

Read more about web workers [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)

## Partytown

Partytown is a lazy-loaded library created to help relocate resource intensive scripts into a web worker, thus unclogging the main thread.

It's philosophy is that main thread should be dedicated to your code, and scripts which are not required to be in the critical path should be moved to a web worker.

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

## Integration

Following Partytown's simple React integration, we can see how easy it is to offload the main thread.

Visit the full documentation [here](https://partytown.builder.io/).

### Install

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

### Configure

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

### Partytown Script

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

### Copy Library Files

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

## Thanks for reading!

Connect with me on [Linkedin](https://www.linkedin.com/in/antonio-erdeljac/).
Binance referans kodu: C15HJGN1
Tags: binance, referans, kodu
Published: 2022-04-11 23:28:34

## Binance referans kodu nedir?

Binance, yeni kullanıcılar için bir referans kodu sunan bir kripto para borsasıdır.

Yönlendirme kodu, kaydolduklarında ticaret ücretinin %50'sini almak için arkadaşlarınız ve ailenizle paylaşılabilecek benzersiz bir bağlantıdır.

Yönlendirme kodu, mevcut kullanıcılar tarafından işlemlerinde %50 işlem ücreti indirimi almak için de kullanılabilir.

## Binance referans kodu ne işe yarar?
Binance referans kodu, spot ve vadeli işlemlerde yapacağınız her işlemde daha az komisyon ödemenize imkan tanımaktadır.

[Binance referans kodu](https://kriptomaymunu.com/binance-20-referans-kodu/) bağlantısını ziyaret ederek detayları öğrenebilirsiniz.
Deepgram x DEV Hackathon - Treehouse - Translating Audio Files
Tags: hackwithdg, nextjs, node, tts
Published: 2022-04-11 23:19:23

### Overview of My Submission
Given some speech in a specific language, use this UI/API to generate a translation - in either text or audio. 

This project focused on building out the API by stitching together Deepgram API for (STT - speech to text), Google Translate API, and Wellsaid Labs API (TTS - text to speech). 

With the creation of this API, applications of it can be used to aid users in understanding audio in another language that may not already come with captions/translation. 

Future Considerations: 
UI

- The goal of this project was to focus on the API rather than the UI. With more time, I'd prefer to swap out this Next.js UI in favor of a Google Chrome extension and try to listen to whatever audio is playing in a browser tab and initiate the translation through the extension. 

API

- Google Translation can translate to a number of languages other than English, but for now the default is set to English until we can access some WellSaid Labs voice actors in other languages. 
- Detecting voice style in audio would be another awesome improvement in order to select a voice actor that "matches" the voices from the input audio. For now we default to 1 voice actor from WellSaid when we could take advantage of the 50+ voices that are available. 


### Submission Category: 
Accessibility Advocates


### Link to Code on GitHub
https://github.com/jumpmanda/treehouse


### Additional Resources / Info
An Example 
(Please note that I have a feature flag disabled so the example below will show the translation part of this app, but not the audio generation part.) 

In this screenshot, we have uploaded an audio clip (taken from an interview with Selena Quintanilla) which is originally in Spanish. And below the button, we display the text that we have transcribed with Deepgram and translated with Google. 
![Treehouse UI with steps on how to use service](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdqvp0zk4s7lbl005ury.png)
Here is the output as from the server logs: 
![Output logs from API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwueidw5zi622aj6b1kq.png)

Sample Audio with [WellSaid Labs](https://wellsaidlabs.com/) Synthetic Voice (Alana B.) hosted here:

http://www.sndup.net/y5qj
"Summarizer" - Convert any video/audio to summarized text
Tags: hackwithdg, webdev, react, node
Published: 2022-04-11 23:16:33


Hello everyone. This is my submission post for the Deepgram hackathon under "Build" Challenge.

### Overview of My Submission
We are often part of long Zoom meetings, where we wish to get the short summary later, or just glance over the meeting notes after some time for reference. Additionally, instead of watching long Youtube videos what if you can just get a gist of it in text form without spending long hours going through the video. [Summarizer](https://magenta-taiyaki-d1a5df.netlify.app/) can help here in easing our life. Just provide Youtube link or upload any video/audio and it will automatically generate the summary along with the entire text to compare with. Along with this, important keywords are listed down too to classify the video in any category and understand its genre.

## Technologies

- Node/Express
- ReactJs
- Deepgram API
- [DeepAI](https://deepai.org/) 

Deployed on Netlify(FE) and Heroku(BE) 

## Future Scope

1. App is using in-memory store for media which might be bottleneck if there are many concurrent users. I would like to use some Database or S3 for media storage
2. Better UI and code cleanup with proper componentization
3. Link to 3rd Party services like Zoom/Google Meet/MS Teams to auto generate the summary and mail to the participants
4. Support for any video/audio external link directly provided to generate the summary


### Submission Category: 

Wacky Wildcards


### Link to Code on GitHub

Server
{% github https://github.com/SushantRatnam/summarizer-server %}

Client
{% github https://github.com/SushantRatnam/summarizer-client %}


### Additional Resources / Info

- [App](https://magenta-taiyaki-d1a5df.netlify.app/)
- [DeepAI](https://deepai.org/) 



![Full Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj4x2j83detb59v9ke7s.png)

![Summary](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heykeb7ccka3sq5vbed7.png)

![Keywords](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ieaidz7ndsgl2d4ixi60.png)
A Letter to LinkedIn Recruiters
Tags: recruiters, jokes, career, watercooler
Published: 2022-04-11 23:02:11

Dear Linkedin Hiring Managers and Aka Tech Recruiters, 

I am writing to you people on behalf of my fellow developers.

Thank you for always trying to reach out to us, even if we mentioned that we are not looking for opportunities on our LinkedIn profiles. We appreciate the courage. We know what it takes for a man to try to date a woman who is in a relationship or married .

First of all, where were you when we were still based in the South? Africa, South America, or Asia? Why did you wait for us to be in Europe or America to start sending us your mails? Don't you know that the future of work is remote and that relocation exists?

Please, next time, if you are reaching out to us, please take some time to go over our profiles and read them carefully. Take some time to go over our Github pages as well. Most of the time, googling our name will take you to our portfolios. Don’t just copy-paste an email and send it to a list of people. This is how some of you requested a creator of a framework four years of experience in the framework he created three years ago. Please do your research. 

If we have agreed to discuss this with you, please, first of all, show up. We know the whole feeling of being ghosted and how it hurts. If we are talking on the phone, please make sure you read our cv/resume before; we don’t want to be asked questions about the technologies we are familiar with or proficient with. Learn our jargon. If we told you that we are proficient with the PyData Stack, why are you keep asking us if we know Pandas and Numpy? If we told you that we have worked with SpringBoot, why keeping asking us if we know Java?

More importantly, never ask us for our salary expectations on the first call, tell us about the budget you have for the role, and that will be enough. Or even worst, asking us for our current salary. If we are currently underpaid, why try to continue with the same schema?

If you keep doing things like this and don’t change your practices, we will run away from your Linkedin and start posting our CV in JSON format to allow only people who can read them. 

Regards.

Sincerely Busy Developers.

PS: I am not looking for work. I am happy with my current role, don’t try to reach out to me again after reading this message.
The Red Rectangle Press - A YouTube voice to text email command line program
Tags: hackwithdg
Published: 2022-04-11 22:59:06

# the-red-rectangle-press

### Overview of My Submission
The Red Rectangle Press is an application that converts the audio from a YouTube video to text and then sends it via email. 
#### What It Does
RRP is a utility tool to increase the accessibility of content on YouTube. You might be wondering - "Why might someone prefer an emailed transcript over the original video?" Well, there are many reasons, some of which include:
* Limited hearing ability.
* Captions are not available for that video.
* Wifi access will be limited at a time when the user could watch the video.
* To be able to search for keywords and only digest the parts they are interested in.
* To use the content in an article or research project. 

#### How It Does It
RRP uses several packages to handle the functionality of the program. The command line input is acquired through using [readline-sync](https://www.npmjs.com/package/readline-sync) which asks users for a YouTube link and an email address. [YouTube mp3 Downloader](https://www.npmjs.com/package/youtube-mp3-downloader) is used to specify YouTube videos from which the audio data should be extracted, converted to MP3, and temporarily stored on disk.
[DeepGram SDK](https://github.com/deepgram/deepgram-node-sdk) then converts the stored MP3 file to a text transcript. And then [SendGrid Mail](https://www.npmjs.com/package/@sendgrid/mail) is utilized to send the transcript as an email to a specified address.

### Submission Category: 

Accessibility Advocates: Use Deepgram to improve user accessibility. Think about user input, accessing media or live events, and improving understanding.


### Link to Code on GitHub

https://github.com/cireneirbo/the-red-rectangle-press


### Additional Resources / Info

Command line screenshot:
![Command line Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3223wtp4geihf6x9ygcg.PNG)
Proof of email receipt and layout:
![Email transcript received](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4uh189y3uucqol6ciwm.PNG)
Day 3: learning begins
Tags: productivity, react, babel, webpack
Published: 2022-04-11 22:52:21

Hi!
check the quote beneath that cover image, _"the secrete of getting ahead is getting started"_ make sense right?
So today was good, I had no issues with motivation whatsoever and since I had few tasks to do I decided it will be an opportunity to start my daily conscious learning. where I have to consciously learn something new everyday
So I started with something that I have been procrastinating to learn for a long time "creating a React app without using create-react-app"

I have this blog website that I developed as a capstone project in a coding training I'm taking, and is really incomplete and messy therefore I wanted to refine it using React and Tailwind. but since I'm a sadist (kidding), to make it even harder for my self I wanted to setup a brand new react project without the usual easier way of using `create-react-app`.
Basically the main benefit I realized with all this setup is that you get to learn how the magic of React really works with setting up Webpack, Babel and everything by yourself to only use what you actually need, so that you can know how to add something new when you need to.
Setting up a new project is not that easy I guess that's why Facebook created create-react-app in the first place, because for me I already read like 10+ articles and even if there is a progress some of it still look weird to me 
tomorrow I plan to finish with this and start a new task or maybe make an article of my own teaching how to setup react without CRA

let the learning begin :)

signing off...