teleren/devto huggingface dataset:
Speed boost to Flipper debugger on Apple M1
Tags: apple, m1, mobile, reactnative
Published: 2022-06-30 22:54:50

**TL;DR** Download the Apple silicon builds of Flipper here: https://github.com/chiragramani/FlipperReleases/releases

[Flipper's](https://fbflipper.com/) official builds are painfully slow on Apple M1 silicon.

The app was so slow that it hindered my daily work. And the worst bit was that not only my CPU was struggling with the Flipper but it also made an iOS app I was working on painfully slow too!

## Intel inside

It turned out that Flipper has been running through Rosetta emulator.

![Activity Monitor showing Flipper running on Intel binaries](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3wak59f5v93alazyfrwn.png)
 
## Universal build to the rescue

Thankfully there are [good](https://github.com/facebook/flipper/pull/3120) [people](https://github.com/facebook/flipper/pull/3553) out there that prepared a Universal App build for Flipper that runs natively on M1 silicon to a great success.

Here's the PR https://github.com/facebook/flipper/pull/3553 for a reference.

## Installation

**UPDATE:** the para-official builds are now available at https://github.com/chiragramani/FlipperReleases/releases

Build M1 silicon-ready Flipper app by running below on your Terminal:

```
git clone https://github.com/aarongrider/flipper.git
cd flipper
git checkout m1-universal
cd desktop
yarn
yarn build --mac
```

Your Apple binary will be at `../dist/mac-universal/Flipper.app`.

Run it by double clicking it in the Finder and you'll immediately see that Flipper and most importantly an app you're developing runs much faster now.

![Activity Monitor showing Flipper running on Apple binaries](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xr33rhi5vx84tvc2rg8a.png)

You can be happy about your M1 machine again.
Ekstension vscode terbaik menurut saya [penggunaan umum]
Tags: webdev, vscode, programming, discuss
Published: 2022-06-30 22:44:55

Dalam penulisan code tentunya kita ingin dipermudah, misalnya kita lupa tentang syntax dan harus menjelajahi google untuk menemukan syntax yang kita inginkan atau kita harus mengurutkan baris kode secara manual agar terlihat rapi. Pada vscode terdapat banyak sekali extension yang sangat berguna dalam penulisan code kita, berikut adalah beberapa extension pada vscode yang menurut saya wajib dan selalu saya gunakan.

## Ekstension untuk penggunaan umum

#### 1. Github Copilot
Digunakan untuk automation code
#### 2. Database client
Ekstension tersebut seperti phpmyadmin pada browser, tetapi kita dapat menggunakannya pada vscode
#### 3. Auto close Tag & Auto rename tag
Jika kalian masih manual menutup atau menamai suatu tag, kalian dapat menggunakane extension tersebut untuk otomatis mengubahnya
#### 4. Bracket pair colorizer 2, Highlight Matching Tag & indent-rainbow 
Extension tersebut digunakan untuk menandai bracket atau kurung kurawal dan juga baris, agar kita tahu kurung kurawal tersebut menutup baris kode mana
#### 5. Beautify
Digunakan untuk merapikan baris kode yang berantakan, ekstension tersebut dapat digunakan dengan menggunakan shortcut ctrl+shift+p lalu ketik beautify file
#### 6. Todo tree
Berfungsi seperti bookmark, misalnya kita memiliki suatu bug pada code dan kita lupa bug tersebut berada pada file/line mana.
Penggunaanya cukup simpel, kita hanya membuat command dan diawali dengan tab/label yang kita buat pada Todo tree, misalnya
// BUG: Tidak bisa menambahkan user
#### 7. Code runner
Digunakan untuk menjalankan kode php, js, python dll
#### 8. Color highlight
Digunakan untuk menyorot warna, misalnya #fff maka akan disorot dengan warna putih
#### 9. Css Peek
Digunakan untuk menampilkan baris css pada class html
#### 10. Project manager
Digunakan untuk berpindah projek secara instant
#### 11. Wakatime
Digunakan untuk tracking kita dalam melakukan pemrograman
#### 12. Color picker
Digunakan untuk menampilkan widget pengambilan warna
#### 13. Live server dan live server preview
Digunakan untuk menampilkan file html secara live, sehingga jika terdapat perubahan, maka tampilan juga akan berubah
.env Manager — Quick way to create Environment Variables
Tags: vscode, extension, tooling
Published: 2022-06-30 22:40:30

Do you use .env files to manage your environment variables in your local dev environment? .env Manager is a small VSCode extension to quickly add values to .env file, either selecting a text or running the command.

https://marketplace.visualstudio.com/items?itemName=onlyutkarsh.envmanager

Checkout the quick demo.


![demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4dgv0mt0elhijkxfcxv.gif)

## Usage
The extension exposes a command called .env Manager: Add to .env. The command is available in VS Code "Command Palette" which you can also access using shortcut <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> on Mac.

![command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35trwxbtcouukz9i7tcj.jpg)

Alternatively you can also right click on any active editor and select `.env Manager: Add to .env` from the context menu.


If the folder does not contain .env file at the root, the extension attempts to create it before adding the line.

> Make sure you backup your .env file if you have very important secrets in the .env file.

> Never commit your .env file in to source control.
Day 584 : Victory Dance
Tags: hiphop, code, coding, lifelongdev
Published: 2022-06-30 21:56:13

_liner notes_:
- Professional : Today was one of those days where things seemed to fight me. haha A library that I need to run to be able to finish recording my videos wasn't working. It didn't stop there, other technologies just seemed not to work. haha. Had a meeting and got to speak with the team. Also helped out with some community questions, so I still got some stuff done.

- Personal : Last night, I basically stayed up to work on the videos and got some stuff done. Not as much as I would like, but it was something.

![Aerial view of Brocton, England with different color, yellow and shades of green, patches of land ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5x7x3igmrkosuh1mgp3.jpg)

Looks like that library that was blocking me is working now. Of course. Going to see if I can knock out at least one video, or at least get all the parts that rely on the library done. Can't wait to get this done and do a victory dance. haha I'm out!

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube NiZPsN2pbTM %}
Discussion and Comment of the Week - v9
Tags: bestofdev
Published: 2022-06-30 21:48:12

**This weekly roundup highlights what we believe to be the most thoughtful and/or interesting discussion of the week. We're also be highlighting one particularly cool comment in each installment. 🙌**

The DEV Community is particularly special because of the kind and thoughtful discussions happening between community members. As such, we want to encourage folks to participate in discussions and reward those who are initiating or taking part in conversations across the community. After all, a community is made possible by the people interacting inside it.

## Discussion of the Week

Props to @josefine for dropping the thoughtful prompt "[What Situations trigger your Imposter Syndrome the most?](https://dev.to/josefine/what-situations-trigger-your-imposter-syndrome-the-most-107a)" 

{% embed https://dev.to/josefine/what-situations-trigger-your-imposter-syndrome-the-most-107a %}

Most of us know that familiar feeling of imposter syndrome. Take one look at the [search results for it here on DEV](https://dev.to/search?q=imposter%20syndrome&sort_by=published_at&sort_direction=desc), and you'll see an endless stream of folks talking about how it's held them back, offering pointers on how to overcome it, and discussing how it rears it's head again and again. Here, Josefine asks us to dig deep and discuss the sources of each of our personal imposter syndromes. There are so many honest, relatable comments dropped in the discussion here. Reminds us all that we're not alone in these feelings. Be kind to yourself and know that you belong! ❤️

## Comment of the Week

This week's winner goes to @dvddpl for their thorough response to @sloan's prompt "[Should I stay with a company in the face of potential future layoffs because of a hiring freeze or start a job search?](https://dev.to/sloan/should-i-stay-with-a-company-in-the-face-of-potential-future-layoffs-because-of-a-hiring-freeze-or-start-a-job-search-3oie)"

{% embed https://dev.to/dvddpl/comment/1pk4m %}

What to do when the future of your company feels uncertain is a question with no easy answer. That said, Davide makes a fantastic case for continuing to look even if your company is doing perfectly fine and you are completely happy. Rather than reiterate every awesome point that Davide brought up above ☝️, I'll just say read that comment! The positive effects of keeping yourself open to job interviews and a new position at a new place really are staggering. That said, it's also worth considering the opposition. @jeremyf brings up some very reasonable factors (see below) to keep in mind when making this tough decision:

{% embed https://dev.to/jeremyf/comment/1pkk3 %}

## What are your picks?

There's loads of great discussions and comments floating about in this community. These are just a few we chose to highlight. 🙂

I urge you all to share your favorite comment and/or discussion of the past week below in the comments. And if you're up for it, give the author an @mention — it'll probably make 'em feel good. 💚
Day 83: Need to rest
Published: 2022-06-30 21:44:34

Hi!
This week is so intense. It's been only Thursday but it feels like it's been a complete week of full job I noticed that I couldn't focus as usual so I had to cancel the rest of the sprint for rest. Today I was working on the multistep form the structure is now complete and tomorrow if I'm more energetic I will focus on validations and responsiveness. 
Today also I got a chance of learning about working with files in Firebase storage specifically uploading images and retrieving their URLs from the Firebase storage. I plan to apply that too tomorrow 
That's it for today
Signing off...
Take the Jamstack Community Survey 2022!
Tags: webdev, netlify, jamstack, javascript
Published: 2022-06-30 21:19:20

The 2022 Jamstack Community Survey is out and we want to hear from you!

[Take the survey here!](https://netlify.qualtrics.com/jfe/form/SV_0BRbhN47gyZWYNo?Source=dev_to)

This is the third year of the survey. Last year when we ran the survey, we had over 7500 responses, and we're excited to get even more this year! We're excited to see the year-over-year trends: which frameworks are growing, which ones are losing ground, which ones make you happiest, which CMS people love the most... it'll be so interesting to see how that has changed over the past year! If you missed last year's results, [you can see the full breakdown](https://jamstack.org/survey/2021/).

Plus, you can get a limited-edition Jamstack sticker with your responses 👀 if you get 'em in quick!

Once again, here's [the link to take the survey](https://netlify.qualtrics.com/jfe/form/SV_0BRbhN47gyZWYNo?Source=dev_to). It should take you about 9.5 minutes, and we'd love to hear your thoughts!
Heres to celebrating wins.
Published: 2022-06-30 21:09:43

![me circa 2020](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2gtcvver41g83slzy9m.png)
 
Was looking through my old posts and found this one. Sitting here as a Tech lead and senior looking back it feels good. Celebration welcome in this thread.
how to display api response separately in react
Tags: discuss, question, react, webdev
Published: 2022-06-30 21:03:55

hey guys 
so i'm working on a blog project where i'm getting multiple api response, but i wan to separate the response. displaying the 1st item only in a different part of my website and displaying the others in another section of website, but i got no idea how to go about this, can anyone please help me out 
thanks
Creating link tags to locales for SEO in NextJS
Tags: i18n, seo, nextjs, javascript
Published: 2022-06-30 20:58:44

This wasn't hard but I didn't find good search results for it so here's a quick tip.

I'm using next-translate with nextjs for localization but this technique will probably work with other localization frameworks like next-i18next.

in pages/_app.ts
```ts
import Head from 'next/head';
import type { AppProps } from 'next/app';
import {useRouter} from 'next/router';

const supportedLocales = ['ar-ye', 'en-us', 'fr'];

export default function MyApp({ Component, pageProps }: AppProps): ReactElement {
  const {asPath} = useRouter();
  return (
    <>
      <Head>
        {supportedLocales.map(loc =>
          <link rel="alternate" hrefLang={loc} href={`/${loc}${asPath}`}/>)}
      </Head>
      <Component {...pageProps} />
    </>
  );
  
}
```

I hope this helps google find your translated pages!
Checking if String UUID is valid with Java
Tags: java, programming, uuid, token
Published: 2022-06-30 20:49:39

## First words
All credits to Daniel Heid. This code is based on his [PR](https://github.com/hibernate/hibernate-validator/pull/1199) in the hibernate-validator repository on Github. Thank you, Daniel!

## The code
If you don't want to read me, just copy the code below and follow the instructions I leave up in the first lines of the code.

```
/* 
 * This code is based on this PR: https://github.com/hibernate/hibernate-validator/pull/1199
 * All credits to Daniel Heid (dheid). I just made some adjustments.
 * In order to apply this on your situation, just create this class and call the method "isValidStringUUID". As its param, pass in your string UUID.
*/

public class UUIDValidator {
    enum LetterCase {

		/**
		 * Only lower case is valid
		 */
		LOWER_CASE,

		/**
		 * Only upper case is valid
		 */
		UPPER_CASE,

		/**
		 * Every letter case is valid
		 */
		INSENSITIVE

	}

    private static LetterCase letterCase = LetterCase.LOWER_CASE;
    
    private static final int[] GROUP_LENGTHS = { 8, 4, 4, 4, 12 };

	public static boolean isValidStringUUID(String value) {
		if ( value == null ) {
			return false;
		}
		int valueLength = value.length();
		if ( valueLength == 0 ) {
			return false;
		}
		else if ( valueLength != 36 ) {
			return false;
		}

		int groupIndex = 0;
		int groupLength = 0;
		int checksum = 0;
		for ( int charIndex = 0; charIndex < valueLength; charIndex++ ) {

			char ch = value.charAt( charIndex );

			if ( ch == '-' ) {
				groupIndex++;
				groupLength = 0;
			}
			else {

				groupLength++;
				if ( groupLength > GROUP_LENGTHS[groupIndex] ) {
					return false;
				}

				int numericValue = Character.digit( ch, 16 );
				if ( numericValue == -1 ) {
					// not a hex digit
					return false;
				}
				if ( numericValue > 9 && !hasCorrectLetterCase( ch ) ) {
					return false;
				}
				checksum += numericValue;
			}
		}
        // NIL UUID
		if ( checksum == 0 ) {
			return false;
		}
        return true;
	}
    private static boolean hasCorrectLetterCase(char ch) {
		if ( letterCase == null ) {
			return true;
		}
		if ( letterCase == LetterCase.LOWER_CASE && !Character.isLowerCase( ch ) ) {
			return false;
		}
		return letterCase != LetterCase.UPPER_CASE || Character.isUpperCase( ch );
	}
}
```

In order to make it work, just create this class in your project and call the method `UUIDValidator.isValidStringUUID(String your_UUID_String_Goes_Here)`.

In this code we have all kind of validations: for if it's null, if it's a blank string, if its length is incorrect, if the digits of the UUID String contains only hex digits, if each group of the UUID contains the right amount of characters, etc, etc. 

If you want a more specialized validator, don't forget to check the PR I mentioned before. It also contains how to get the UUID version and its variation.

### Good to read

If you want to dive in on this subject (it's definitely so rich and interesting), you can check [this link](https://www.uuidtools.com/decode).

## ...The end!

That's all! Thank you for this reading 😁
Why you should be careful using setInterval?
Tags: javascript, typescript, webdev
Published: 2022-06-30 20:47:01

If your are here, I am sure that you came across the 2 beautiful Web API's `setInterval` and `setTimeout` and want to make an even more deeper dive into understanding them and how they work.

Let us jump into the topic of the post...

I assume that you understand the basic functionalities of `setInterval` and `setTimeout`.

Now, before understanding why `setInterval` is this mischievous guy, we must first remind ourselves that Javascript is a single threaded language i.e. it can perform no more than one task at a time.

Let us take an example to explain the problem with `setInterval`.

```javascript
function serverCall() {
    setTimeout(function() {
        console.log('x', new Date().toLocaleTimeString())
    }, 3000)
}

function callServerCall() {
    setInterval(function run() {
        console.log('y', new Date().toLocaleTimeString())
        serverCall()
    }, 1000)
}

callServerCall()


// Output will be
// y 02:00:54
// y 02:00:55
// y 02:00:56
// y 02:00:57
// x 02:00:57
// y 02:00:58
// x 02:00:58
// y 02:00:59
// x 02:00:59
// y 02:01:00
// x 02:01:00
// y 02:01:01
// ..
// ...
```
You can clearly see that `setInterval` keeps on running after every 1 second even without caring if the previously called `serverCall` function was executed or not.

This will prove to be a huge overhead on us because there will be a lot of requests to the server which are queued.

## Points to be noted

- When we call asynchronous operations inside `setInterval` it will prove to be very costly for us. 

- Even if your async operation takes lesser time than the `delay` set to the `setInterval`, the gap between two async calls wouldn't exactly be the `delay` set. It would be much lesser than that because the time taken to execute the async operation will also be calculated in the delay.

I hope the article helps.

Reach me out on [Github](https://github.com/rak-shit) and [LinkedIn](https://www.linkedin.com/in/mrakshit/).

Follow me on [Twitter](https://twitter.com/mRakshit_)

Have a nice day :)
Best Engineering Blogs for tech companies
Tags: systems, webdev, programming, discuss
Published: 2022-06-30 20:32:23

When studying for system design interviews, it is always helpful to understand the companies system and how they work. This means looking into their engineering blog and getting familiar with what they are currently working on.

Instead of having to search for each companies engineering blog, I put together a resource that not only links each tech companies blog & RSS feed, but rates the quality of the blog. I share 1-5 stars based on the quality of the content, frequency of posting, engineering deep dives, RSS feed, organization, and graphics. 

Check it out here: https://www.hackpack.io/engineering-blogs

Let us know if you have feedback or think we are missing any good ones!

### Join the community

Looking for a study partner? Hackpack is the most active community of engineers studying for programming interviews. We hold each other accountable, provide support, and fight burnout to study more efficiently and get the job faster.

Apply [Here](https://www.hackpack.io/) 

[Events](https://discord.gg/VQkMr234zk?event=970275330294153257) | [Youtube](https://www.youtube.com/channel/UCfotE5RL1pfhIZ0fv2kAN9Q) | [Twitter](https://twitter.com/hackpack_) | [LinkedIn](https://www.linkedin.com/company/hackpack-io/?viewAsMember=true) | [Newsletter](https://fangprep.substack.com/)
Do You Have What It Takes to Become an XRP Ledger Campus Ambassador?
Published: 2022-06-30 20:30:58

Earlier this year, the [XRP Ledger Campus Ambassadors](https://xrpl.org/ambassadors.html) program launched to nurture a love of blockchain, connect students with other like-minded people and empower them to drive the next evolution of the [XRP Ledger (XRPL)](http://www.xrpl.org).

Since opening the application window for the Fall 2022 cohort, the program has already received thousands (wow!) of applications. 

But don’t worry, it’s not too late to [apply](https://xrpl.org/ambassadors.html) to join the program. 

**Why become an XRPL Campus Ambassador?**

Campus Ambassadors spread knowledge and excitement about the possible use cases and benefits of the XRP Ledger. Take it from Derrick N, a Campus Ambassador from the Spring cohort at Ryerson University:

“I have learned so much through creating programs and connecting with the XRPL community. I’m truly grateful for everyone’s support along the way and for the opportunity to gain so much knowledge from this experience,” said Derrick.

For Titose C. at the University of Cape Town: “I have a sense of fulfilment knowing that I am playing my part in educating young people in South Africa and exposing them to the boundless opportunities that blockchain brings about.” 

Selected Ambassadors will also earn various privileges, including:

- Access to Ambassador-only events and conferences
- Hands-on experience in building their professional network. 
- Tutorials and workshops from industry-leading XRPL and blockchain developers
- Mentorship from notable members of the XRPL and blockchain community
- Funding to back their XRPL growth-fueling ideas and initiatives on campus
- Fresh swag to share with other students

**Who can apply?**

The XRPL Campus Ambassador program is open to currently enrolled college students at an accredited university or college. Ambassadors must be available to devote 2–3 hours per week to the program between late August and December 2022. 

Above all, prospective Ambassadors should have a passion for blockchain technology and be:

- **Curious** about technical blockchain topics and XRPL
- **An active participant** in the XRPL community or simply interested in blockchain and crypto technologies
- **Ready to enact meaningful change** through the blockchain innovations
- **Passionate** about increasing awareness and education on these topics through classroom engagement, events and content?
- **Interested in leading** meetups and workshops for your campus community

If the above criteria sounds like you, submit your application to become an XRPL Campus Ambassador [here](https://xrpl.org/ambassadors.html).