teleren/devto huggingface dataset:
How to setup .NET Core Blazor Server with Tailwind CSS
Published: 2022-04-15 00:28:00

---
title: How to setup .NET Core Blazor Server with Tailwind CSS
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

```
mkdir TailwindDotNet
cd TailwindDotNet
dotnet new blazorserver
npm init -y
npm install -D tailwindcss autoprefixer postcss
npx tailwind init -p
```
Edit package.json and add a run script for CSS generation

```json
"scripts": {
    "css:build": "npx tailwind build ./wwwroot/css/site.css -o ./wwwroot/css/output.css"
  },
```


Delete bootstrap stuff

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yv4xxytyj1w1mtnxcl7e.png)
 
You site.css should include only the following lines

```
/*! @import */
@tailwind base;
@tailwind components;
@tailwind utilities;
```

Add the following lines in `tailwind.config.js`

```
'./Pages/**/*.cshtml',
'./Pages/**/*.razor',
'./Views/**/*.chstml',
'./Views/**/*.razor',
'./Shared/**/*.razor',
```


Modify your .csproj to include a css build step

```xml
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>
  <ItemGroup>
        <UpToDateCheckBuilt Include="wwwroot/css/site.css" Set="Css" />
        <UpToDateCheckBuilt Include="postcss.config.js" Set="Css" />
        <UpToDateCheckBuilt Include="tailwind.config.js" Set="Css" />
    </ItemGroup>

    <Target Name="Tailwind" BeforeTargets="Build">
        <Exec Command="npm run css:build"/>
    </Target>

</Project>

```

Modify `_Layout.cshtml` to reference output.css instead of site.css and remove any bootstrap references

```html
    <link href="css/output.css" rel="stylesheet" />
```

So now when you compile and run, it will build the output.css


## Working with dotnet watch

Just run in a terminal window

```
npx tailwind build ./wwwroot/css/site.css -o ./wwwroot/css/output.css --watch
```

Then run dotnet watch

```
dotnet watch run
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4onk8k5fxprzikh4ur3u.png)
The Ultimate Guide To AP SETUP GUIDE
Tags: javascript, beginners, webdev
Published: 2022-04-15 00:01:19

A user can log in to the [ap.setup](https://myap-setup.net/) extender using the browsers of the computer. When the connection process is done, a user can perform the login process of the setup page. You can use the browser to interact with the web interface of the Wavlink range extender. A user must know the correct credentials to log in to the web utility page of the range extender. Without correct login credentials, a user can’t access the web interface of the Wavlink range extender.
📘 Book Review: Technical Blogging
Tags: books, reading, blogging, writing
Published: 2022-05-16 09:01:47

---
title: 📘 Book Review: Technical Blogging
published: false
date: 2022-04-15 00:00:00 UTC
tags: Books,Reading,Blogging,Writing
canonical_url: https://www.codecraftr.nl/technical-blogging-book-review/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4irh04j992p3krk2xbh.png
published: true
 ---

Are you thinking about starting a technical blog? Technical Blogging might be the book for you. Learn why in this review.

## 📜 Technical Blogging in a Nutshell

[Technical Blogging: Amplify Your Influence](https://pragprog.com/titles/actb2/technical-blogging-second-edition/) is best described as a one-stop-shop for all everything you need to know to get your blog started.

It covers lots of topics, and loosely follows the chronological order of planning, building, promoting, benefiting from, and scaling your blog. It aims to provide you, an aspiring blogger, an A-Z on setting up, maintaining, and growing your blog. The end goal is to increase your influence as a professional or company via your blog.

## ⚖️ Likes and Dislikes

Technical Blogging is a good book and an enjoyable read. It’s **well-structured** , and brimming with **pragmatic tips** to improve your existing blog or get a running start with a new one.

I liked the enormous **breadth of topics** covered. They range from registering a domain name, writing great content, to leveraging social media to grow your audience. After reading, you will know at least the basics of a ton of aspects of blogging.

This broad range of subjects means that the book only scratches the surface of many topics. If you are looking for in-depth content about specific subjects, you will not find it here.

Another aspect where the book could be better would be to include data from other blogs and opinions other the authors. This would have made some arguments and claims in the book more compelling.

## 🙋 Who Should Read It?

Starting, or aspiring technical bloggers will get the most out of Technical Blogging. It is also suited to companies who want to start a blog to grow their influence.

Are you a veteran blogger? Then this book might not be worth your while as it is at an introductory to intermediate level.

## ⭐ The Verdict

Are you a starting technical blogger, or thinking about becoming one? Pick up this book, it will not let you down.

It’s a pleasant read, covers a lot of ground and as a starting blogger, I’ve found it incredibly helpful.

Final score: 7 out of 10.
NodeJS: How to test the npm package before releasing
Tags: development, node, npm
Published: 2022-05-15 09:34:50

---
title: NodeJS: How to test the npm package before releasing
published: true
date: 2022-04-15 00:00:00 UTC
tags: development, node, npm
canonical_url: https://strdr4605.com/node-js-how-to-test-the-npm-package-before-releasing
cover_image: https://strdr4605.com/node-js-how-to-test-the-npm-package-before-releasing.jpg
---

Let's say you have a **core** package that is used in your **app** and **mobile** projects.

Now you need to do some changes, both in **core** and **app**.

In the process of local development, you should test that **core** is working correctly with **app** before the release.
You can use [`npm link`](https://docs.npmjs.com/cli/v8/commands/npm-link), but from my experience, it's not always working as expected.

A better alternative is [yalc](https://github.com/wclr/yalc). You can check it yourself, but shortly, as the package itself says:

> Better workflow than **npm | yarn link** for package authors
After everything is working locally, you are ready to do a Pull Request. 
But wait! The CI will fail because the new version of **core** is only available locally.

To fix this, we need a prerelease version of the **core** that will be installed in CI, or then other engineers will try it on their machines.

Let's, say the previous version of **core** was `1.0.1`, and you are working on future `1.0.2`.

[Semver.org docs](https://semver.org/spec/v2.0.0-rc.1.html) suggests to use `1.0.2-rc.1` (release candidate),
but this approach does not work well when you are working on a project where many engineers can release to **core** before you.

From my experience, the best is to have a prerelease version that is associated with some issue/ticket/task number in the format:

**`<current version>`**-**`<issue number>`**.**`<WIP version>`**

Example: `1.0.1-4605.0`, `1.0.1-4605.1` ...

The important part before publishing such a prerelease version is to set a tag. 
If you don't set a tag, the package will be published as `latest`, 
and then someone will try to install the **core** package, it will get the wrong "`latest`" version which may still be WIP.   
For this, you might use the `dev` tag.

## So, the workflow

1. You do changes in **core**
2. Use the WIP version of **core** in **app** locally using `yalc`
3. When the task is ready:
  - Change the version of **core**: `1.0.1-4605.0`
  - Publish the WIP version: `npm publish --tag dev`
  - Update the **app** with WIP version of **core**
  - Do move WIP prereleases if needed: `1.0.1-4605.1`
4. Create PRs for both projects
5. When **core** PR is approved
  - Merge **core**
  - Set new version `1.0.2`
  - Publish **core**: `npm publish` (`latest` tag is default)
6. Update **app** PR with new version of **core**
7. Merge **app** changes into master
8. Happy coding
How to sign in to watch movies and TV shows - Roku Support
Tags: javascript, webdev, beginners
Published: 2022-04-14 23:57:23

A user can change the email address and login password of the Roku account login window using the web interface of the [Roku device](https://rokulogin.com/). Visit the web interface of the Roku device using the computer or smartphone. Type my.roku.com on the address bar of your browser. Sign in to the Roku account by typing in the correct credentials on their respective fields. Take the cursor to the Account Information section, click on the Update button, perform the change you want to perform, after making changes click on the Save button.
Stop Wasting Time And Start DLINKROUTER.LOCAL
Tags: javascript, beginners, webdev
Published: 2022-04-14 23:55:09

Users have been recommended to enable the password recovery feature so that in case you forgot the login password, you can easily recover it using the [dlinkrouter.local](https://dlink-router-local.com/) interface. While configuring the password recovery feature, you have to assign the two security questions, the answers of which you need to give while recovering the forgotten password. The recovery process of the forgotten password is done through the dlinkrouter.local window.
Why My WIFI.WAVLINK.COM Is Better Than Yours
Tags: javascript, webdev, tutorial
Published: 2022-04-14 23:50:25

The [wifi.wavlink.com](https://wifiiwavlink.com/) web interface is an inbuilt server with the help of which a user is able to interact with the various settings and features of the range extender. If you are facing any issue while interacting with the web management of the Wavlink device, make sure the physical connection between the range extender and the router is correct. During the connection process, you can also take help of the manual guide which comes along with the device.
What is the default Orbi admin password?
Tags: javascript, webdev, beginners
Published: 2022-04-14 23:49:16

Using the Parental Control option a user can block specific websites from being accessed within the network. Most of the time, parents use Parental Control from keeping their kids away from accessing the adult and malicious websites in the [orbilogin.com](https://orbillogin.net/) network. You can also create a schedule using the Schedule tab according to which the websites and services will get utilized in the network. First, go to the Days to Block option to specify the days in a week in which you want to block then go to the “Time of Day to Block” option to specify the time in a day for which you want to block the websites.
Deploying an Expo Web React Native App to Google Cloud
Tags: webdev, tutorial, devops, reactnative
Published: 2022-04-14 23:35:35

Building mobile apps has never been easier thanks to Expo. According to their website, Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.

Paired with Google Cloud Run, highly scalable containerized a fully managed serverless platform, Expo web apps can be extremely quick to make and ship.

Here’s how to build and deploy your React Native Expo web app to Google Cloud Run:

## 0) Setup Expo

I’m assuming you already have an Expo app setup and running locally (their docs are super easy to follow)

## 1) Add a Dockerfile to the root of your application

You can copy and paste this one into your project:

`# build environment
FROM node:14-alpine as react-build
# install global packages
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH /home/node/.npm-global/bin:$PATH
RUN npm i --unsafe-perm -g npm@latest expo-cli@latest
WORKDIR /app
ADD . ./
RUN yarn
RUN npx expo-optimize
# used for ENV
RUN expo build:web --release-channel prod
# server environment
FROM nginx:alpine
ADD nginx.conf /etc/nginx/conf.d/configfile.template
COPY --from=react-build /app/web-build /usr/share/nginx/html
ENV PORT 8080
ENV HOST 0.0.0.0
EXPOSE 8080
CMD sh -c "envsubst '\$PORT' < /etc/nginx/conf.d/configfile.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"`

The key elements here which are super important is making sure to expo-cli as well as including the RUN npx expo-optimize and RUN expo build:web — release-channel prod commands.

These include all the necessary Expo packages and scripts.

## 3. Setup Google Cloud

You’ll need to make sure you’ve enabled Cloud Build, Cloud Run and Container Registry in your project.

You’ll also need to sign into Gcloud from the command line:

`gcloud auth login
gcloud config set project YOUR_PROJECT_ID`

4. Build using Docker

gcloud builds submit --timeout=2000s --machine-type=N1_HIGHCPU_8 --tag gcr.io/YOUR_PROJECT_ID/frontend

You can remove the machine-type=N1_HIGHCPU_8 tag if you want to use the starter level server. Make sure to add your project ID.

The cli will prompt you to enter a project name

## 5. Submit build to Google Cloud Run

`gcloud run deploy YOUR_PROJECT_NAME —image gcr.io/mortar-329801/frontend --region us-west2 --platform managed
`
Feel free to change the region.

And your app is live!
How to Deploy Your Shopify React App to Heroku
Tags: shopify, heroku, webdev, javascript
Published: 2022-04-14 23:24:32

I followed the [Build a Shopify App with Node and React](https://shopify.dev/apps/getting-started) to start my first Shopify app. The server sets you up using a local ngrok server which was pretty impractical since I travel a bit.

The steps are as follows:

1. Create new app on Heroku
2. Connect app with your Github repo/branch (it may take a minute or two to load)
3. Place your SHOPIFY_API_KEY and SHOPIFY_API_SECRET_KEY in your Heroku app’s Config Vars located in Settings.
4. Update your Shopify App Urls with your live Heroku app link (https://example-app.herokuapp.com/) and (https://example-app.herokuapp.com/auth/callback)

That’s it. Your app should be live and ready to scale!
Local and Production ENV Variables using Expo React Native
Tags: reactnative, javascript, programming, react
Published: 2022-04-14 23:17:18

Expo recently came out with a new feature which makes managing ENVs a lot easier using what they call a dynamic app config file.

**Here’s you to setup env variables for different environments in Expo:
**

1. Create and app.config.js file at the root of your repo
2. Populate the file, it should look something like this:

import 'dotenv/config';

`export default {
     name: 'APP_NAME',
     version: '1.0.0',
     extra: {
         environment: 'dev'
     },
};`

3. Call variable. Now when we run our application, we can access the environment variable by doing the following:

`import Constants from 'expo-constants';
export default function App(props) {
     console.log("props.environment: ", props.environment)
}
App.defaultProps = {
     environment: Constants.manifest.extra.environment,
};`

4. Setup different variables for production and local development. To do this, we’ll need to change out deploy script to manually add a variable describing the environment.

I place mine in a Dockerfile which Google Cloud uses to build my application:

`RUN ENVIRONMENT=prod expo build:web
`
But you you add the ENVIRONMENT=prod to wherever you are building your app.

5. Update the app.config.js to make variables dynamic based on the environment.

`import 'dotenv/config';
if (process.env.ENVIRONMENT === 'prod') {
    export default {
    name: 'APP_NAME',
         version: '1.0.0',
         extra: {
              environment: 'prod'
         },
     };
} else {
      export default {
         name: 'APP_NAME',
         version: '1.0.0',
         extra: {
               environment: 'dev'
          },
     };
}`

Here we check the ENVIRONMENT variable and then we can update the extra variables based on where we are using our app. When we deploy our app will use variables defined in the top section.
Interesting libraries, fonts and more
Tags: css, react, javascript
Published: 2022-04-14 23:11:52

Share yours below! 😉

## Web Tools, libraries and more
- [Typescale](https://type-scale.com/): Great tool for all devs that are obsessed with getting the typography right
- [UI Colors](https://uicolors.app/create?ref=producthunt): Create Tailwind CSS color family
- [DaisyUI](daisyui.com): The most popular, free and open-source Tailwind CSS component library
- [Confetti](https://www.skypack.dev/view/canvas-confetti): Performant confetti animation in the browser
- [Mantime](https://mantine.dev/): React UI Library
- [Nocodb](https://github.com/nocodb/nocodb): Open Source Airtable Alternative - turns any MySQL, Postgres database into a collaborative spreadsheet with REST APIs.
- [Meilisearch](https://github.com/meilisearch/meilisearch): Powerful, fast, and an easy to use search engine
- [Zinc](https://github.com/prabhatsharma/zinc): Zinc Search engine. A lightweight alternative to elasticsearch that requires minimal resources, written in Go.
- [Partytown](https://github.com/BuilderIO/partytown): Relocate resource intensive third-party scripts off of the main thread and into a web worker.
- [Asciinema](https://asciinema.org/): Record and share your terminal sessions, the simple way.
- [Not paid](https://github.com/kleampa/not-paid): Client did not pay? Add opacity to the body tag and decrease it every day until their site completely fades away

## Fonts
- [Manrope](https://manropefont.com/) [[Google Fonts](https://fonts.google.com/specimen/Manrope)]
- [Space Grotesk](https://fonts.google.com/specimen/Space+Grotesk)
- [Recoleta](https://www.behance.net/gallery/66716945/Recoleta)
- [Newake](https://www.behance.net/gallery/118133975/Newake-Free-Font)
- [Sonder](https://pixelsurplus.com/collections/free-fonts/products/sonder-regular-free-font)
- [Modernist](https://www.behance.net/gallery/32918197/Modernist-Typeface)
- [Archia](https://www.atipofoundry.com/fonts/archia)
- [Technique](https://www.behance.net/gallery/79907715/Technique-Free-Font?tracking_source=search%7Cfont)
- [Campton](https://www.behance.net/gallery/14680165/Campton-Typefamily)
- [Track](https://www.fontfabric.com/fonts/track/)
- [Plus Jakarta Sans](https://tokotype.github.io/plusjakarta-sans/) (open source)

## Jobs search
- [Relocate.me](https://relocate.me/): Niche job board
for techies looking to relocate
- [Workby.io](https://workby.io): Hiring remote devs around the globe (self-promotion 😛)
What are methods in golang
Tags: go, programming, tutorial
Published: 2022-04-14 22:53:10

Hi, I'm Abdulrahman I'm glad to share this blog, in this blog we will talk about methods in golang.
so first we must know Go does not have classes because it doesn't support Object-oriented  programming.
## What is Object-oriented
Object-oriented its way to allow programmers to declare a function inside the class definition. Go doesn't allow us to do that, we have to declare a method on a struct via a special syntax

because Golang doesn't support Object-oriented  programming but Golang has Methods.

## What is Methods in golang
Method is a function with a special `receiver` argument and this method can access the properties of the receiver. `Receiver here can be type struct or non type struct like(int-string-etc...)`

### let's see the syntax with example
**Syntax**
```go
func (r ReceiverType) funcName(parameters) (result){/*code*/}
```
this above example is ho we define a method for any `Receiver here is => YourStruct`
Let’s see a full example to understand how to define a method on a type and how to invoke such a method 
```go
package main

type User struct { //define a struct
	FirstName string
	LastName  string
}
```
in above example we defined a struct has `FirstName-LastName` and if we want to get the FullName  we can get them like this:
```go
package main

import "fmt"

type User struct { 
	FirstName string
	LastName  string
}

func main() {
	user := User{
		"Abdulrahman",
		"Masoud",
	}
	fmt.Print(user.FirstName+" "+user.LastName)
	// Result => Abdulrahman Masoud
}
```
but in GoLang you are allowed to define a method whose receiver is your struct like we say before.
This receiver is accessible inside the method as shown in the below example:
```go
package main

import "fmt"

type User struct { //define a struct
	FirstName string
	LastName  string
}

// GetFullName method to get full name
func (u User) GetFullName() string {
	return u.FirstName + " " + u.LastName
}

func main() {
	user := User{
		"Abdulrahman",
		"Masoud",
	}
	fmt.Print(user.GetFullName())
	// Result => Abdulrahman Masoud
}
```
In above example we defined a struct that has the inputs that I need and second, we defined a `GetFullName` method and add a receiver for this method `(u User) => this is the receiver of method`

### Let's define non type struct
**Syntax**
```go
package main

import "fmt"

type Age int

func (a Age) GetAgeAfterTenYears() int {
	return int(a + 10)
}

func main() {
	age := Age(22)
	fmt.Print(age.GetAgeAfterTenYears())
	// Result => 32
}
```
In above example we defined an Age type it's not a struct type its non type struct like we say before `Receiver here can be type struct or non type struct`

### End of blog
**Summary**
- Go does not have classes because it doesn't support Object-oriented
- Golang doesn't support Object-oriented  programming but Golang has Methods
- Method is a function with a special receiver
- Receiver is type
- Receiver can be type struct or non type struct
- method can access the properties of the receiver

**I hope you enjoy this kickoff to a new blog in Golang,
Looking forward to sharing these blogs with you.**
Create a landing page fully responsive for your website. Within 48 hours.
Published: 2022-04-14 22:51:57

A successful online marketing campaign starts with an effective website or landing page. If the design of the landing page of your website is very beautiful, then people will be attracted to your website

**What do I need from you to design the website?**

➦ First of all, you have to discuss it with me
➦ If you have domain hosting, give access to your website
➦ Give me some product picture.
➦ Give me the contents of your landing page.

This is my Fiverr account my portfolio link and many more......
personal website: https://developerzisan.com
Fiverr Account: https://lnkd.in/diXVNbfy
Facebook link: https://lnkd.in/eQRnPpFe

#landing_page 
#landing_page_design
#WordPress_landing_page
#create_landing_page
VS Code Tip of the Week: Local History
Tags: vscode, vscodetips
Published: 2022-04-14 21:33:54

This week's tip of the week is care of Benjamin Pasero from the Twitters.

Local history has landed in VS Code! It’s currently only available in VS Code Insiders. On another note, I highly recommend the [Insiders edition](https://code.visualstudio.com/insiders/). I’ve been using it for years and it’s super stable.

{% embed https://twitter.com/benjaminpasero/status/1511010753364570117 %}
VS Code Tip of the Week: Open a Project from the Shell into same VS Code Window
Tags: vscode, vscodetips
Published: 2022-04-14 21:31:28

This week's tip is short and sweet.

My friend Chris on Twitter this week asked how do you open a project from a shell without opening another VS Code window.

{%embed https://twitter.com/saltnburnem/status/1508986426737709057 %}

All you nee to do is add the `-r` flag to reuse the window, e.g.

```bash
code -r ./some-folder
```

or 

```bash
code ./some-folder -r
```

The same goes for individual files.

```bash
code -r ./some-file.ext
```

or 

```bash
code ./some-file.ext -r
```

Happy VS Coding!