teleren/devto huggingface dataset:
pfSense Quickstart
Tags: pfsense, router, security, installation
Published: 2024-04-24 02:27:09

#### Prerequisite:
1. Create vmbrX/VLAN/etc virtual bridge in Proxmox > Network
2. Have an internet connection vmbr0 probably
3. 8 GB disk, 512 MB RAM, 1 CPU core and two IPs
4. watch a quick tutorial to see the latest updates

#### Steps: 
1. Using ISO creates a VM 
2. Add vmbr0 and vmbr1 and vmbr1 must be connected to the internet
3. make vmbr0 as a **private** LAN add a static ip 172.27.1.1/26 255.255.255.192 
4. DHCP vmbr1
5. Create some SSH or VPN tunnel connection and get access to 172.27.1.1
5. Go to http://172.27.1.1/
6. ID admin and pas: pfsense so set a new password
7. Go to interfaces > Assignments > Add Private LAN and WAN connections
8. Click on Private LAN or WAN | Go to Interfaces > Private LAN or WAN
9. Enable both 
10. IPv4 Configuration Type static IP in Private LAN and type 172.27.1.1 below in IPv4 Address and select CIDR as 26
11. Go to services > DHCP Server > Enable DHCP for Private LAN and select a DHCP range 172.27.1.10-172.27.1.60

#### Adding more bridges
1. repeat proxmox steps
2. Add new network in pfsense VM
3. Again go to the interfaces and configure them and set DHCP server
4. Set up firewall rules as 
    Action: Pass 
    Protocol: Any
    save to provide internet access
5. You may add one more rule to 
    Action: Block 
    Protocol: Any 
    Destination Private LAN
    and save it to block any network reaching Private LAN devices

#### Important notes after creation

1. In pfsense make it eth0 and make a working internet link as eth1 although eth0 would be a LAN and eth1 as WAN
2. Don't forget DNS servers and Firewall rules to allow everything.
3. Firewall Rule> Block access to private LAN from each LAN
4. In Pi Hole> enable DNS to resolve from any origin of network. Go to settings >DNS>Interfce

#### Issues
1. Sometimes DNS does not resolve in VMs so in that case add 1.1.1.1 or any secondary DNS server

### DNS Forwarding

Change domain to pfsense.private.babunet
and configure proxmox.private.babunet as DNS Forwarder > Host Overrides

To enable hosts visible by their hostnames. Or you may assign a custom hostname by custom IP as follows:
    1. ServicesDHCP > Server > DHCP Static Mappings
    2. Assign host+domain name
    3. in DNS 

##### Troubleshoot clear DNS cache in PC and browser
1.    `sudo systemd-resolve --flush-caches`
    chrome://net-internals
    Check DHCP lease under Status

2. When pfsense IP is not reachable means firewall rules need to be reordered or change
pfSense basic firewall setup
Tags: pfsense, firewall, router, security
Published: 2024-04-24 02:23:53

# pfSense Firewall

**Important** Firewall rules are applied in top-to-bottom order

#### Create Alias
Add an alias to list all the private IP addresses as per RFC1918
`pfsense > firewall > Alias > IP > Add > Network`

```
# RFC1918
10.0.0.0/8 
172.16.0.0/12
192.168.0.0/16
```

# Create Rule

`pfsense > firewall > Rules > Add`

```
# Rule1 [All VLANs]
# to access internet and block all LAN addresses
Action: Pass
Protocol: Any
Source: Any
Destination: Ignore Alias RFC1918
Save!
```

```
# Rule2 [ExperimentalLAN]
# to access ExperimentalLAN from any LAN
Action: Pass
Protocol: Any
Source: Any
Destination: ExperimentalLAN
Save!
```
What is Google ScreenAI?
Tags: google, screenai, technology, ai
Published: 2024-04-24 02:21:09

Google ScreenAI is a recently introduced vision-language model (VLM) by Google AI. VLMs are a type of AI that can understand both the visual and textual aspects of information. In simpler terms, ScreenAI can make sense of what it sees on a computer screen, including both the text and the images.


## Why is it important?

**Smarter virtual assistants:** Imagine a virtual assistant that can understand the context on your screen and answer your questions about it. ScreenAI could be used to create VAs that can answer questions about complex data visualizations or guide you through the steps on a website.

**Improved accessibility tools:** ScreenAI's ability to interpret UIs could be used to develop more advanced screen reader technology for visually impaired users. It could describe not just the text on the screen, but also the layout and functionality of buttons and menus.

**Automated UI testing:** Developers use UI testing to ensure their applications function correctly. ScreenAI could potentially automate parts of this process, by analyzing the UI and identifying potential issues.



## How it works?

**Architecture:** ScreenAI is built on a foundation called PaLI (Paired Learning for Language and Image Understanding). PaLI combines two key components: a multimodal encoder block that processes both visual and textual data, and an autoregressive decoder that generates text output.

**Training:** Like many AI models, ScreenAI undergoes a two-stage training process. First, it's pre-trained using self-supervised learning on a massive dataset. Then, it's fine-tuned on specific tasks through datasets labeled by human experts. For ScreenAI, these tasks involve question-answering, summarization, and navigation-related to user interfaces.




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

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


ScreenAI is a step towards AI that can better interact with the visual world on our computer screens. It has the potential to be used in various applications, such as creating more intelligent virtual assistants or improving accessibility tools for visually impaired users.



It's important to note that ScreenAI is a recent research project. While it shows promise, it's likely **not yet in a commercially available state**. More research and development are needed before we see widespread applications of this technology.

For further reading check: [screenAI](https://research.google/blog/screenai-a-visual-language-model-for-ui-and-visually-situated-language-understanding/)


I hope this article helps you❤️

Check out my other handles: [richard.is-a.dev/about](https://richard.is-a.dev/about)
Linux WiFi Drivers
Tags: linux, wifi, driver, compile
Published: 2024-04-24 02:19:43

I bought USB wifi adapter Realtek Semiconductor Corp. USB3.0 802.11ac 1200M Adapter and connected it successfully on Ubuntu.

#### Following worked on Ubuntu 20.04.6 LTS
```
lsusb
sudo apt update
sudo apt install linux-generic
iwconfig
#nm-connection-editor
#nmcli connection up [YourWiFiConnectionName]
```
UFW - Quickstart
Tags: ufw, firewall, linux
Published: 2024-04-24 02:16:55

## Most common commands
`sudo ufw enable`
`sudo ufw disable`
`sudo ufw status numbered`
`sudo ufw delete 1`
`sudo systemctl status ufw.service`

[More commands](https://blog.programster.org/ufw-cheatsheet)

#### Rules

```
ufw default deny # deny incoming by default
ufw allow from 90.16.45.159 # allow all from IP
```

### Troubleshoot
1. Disable it first and then add rule and enable it
2. `sudo ufw reload`

### Issues
1. It does not block docker ports well


### IPTable
Cheat sheet: https://andreafortuna.org/2019/05/08/iptables-a-simple-cheatsheet/
Disk Management in Linux
Tags: linux, disk, storage
Published: 2024-04-24 02:10:52

`lsusb` check attached USBs
`lsblk` check attached storage blocks
`smartctl` check disk info
`df -H` check disk space


`mount /dev/sdd1 /mnt/usb` to mount a drive
`umount /mnt/usb` unmount it

#### Mount NTFS Drive

```
sudo apt update
sudo apt install ntfs-3g

sudo mount -t ntfs-3g /dev/sdb1 /mnt/myntfs
sudo umount /mnt/myntfs
# Troubleshoot when not mounting
ntfsfix /dev/sdd2

```


#### Auto mount on reboot
Using 'fstab'
- use `exfat-fuse` instead of ntfs if the drive is not ntfs
- get UUID by `blkid /dev/sddX`

```
# /etc/fstab
UUID="<FE1A9E921A9E4793 REPLACE THIS>" /mnt/new-mount-path ntfs defaults,x-systemd.automount 0 0

```
`mount -a` to apply fstab which is filesystem table
1 Common Mistake Junior Developers Make
Tags: webdev, beginners, ai, html
Published: 2024-04-24 02:00:00

You are working on too many different things at once.

As a new developer, you want to look competent.

And you want people to think that you are very efficient. 

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

That you just happen to be this coding prodigy that came out of nowhere.

But take a look at senior to mid level devs.

They reject the extra work because they are in the middle of something.

They are in the middle of, one thing.

They have a really good grasp of that one thing, and the requirements for that one thing.

And they get it done well.

You, on the other hand, have 3 things going on.

Of which you don't fully understand.

And your brain has to jump back and forth between them.

As a new dev, don't be embarrassed to say, 

"I'm currently in the middle of something. Let me get this done first, then I will jump on that."

Stop volunteering for everything.

Get your one assignment, understand the requirements well, and then knock out the park.

Be a dev that always delivers over one that is always in the middle of 10 different things.

And always has to give updates and excuses for all the things that you are doing.

Take one task assignment at a time, and complete it.

And commit to a new task only when the previous task is delivered as requested.

In fact, building software is a slower process than you think. Especially if you want to do it right.

Rooting for you,

Karl ⛹️

Ps. [The Complete JavaScript Course](https://bit.ly/3xkUn90) is the programming course I wish I had when I was younger. It contains everything I’ve learned from building million-dollar web applications. Let’s build your dream freelance career this weekend! 💚
tmux status bar toggle
Tags: tmux, terminal, productivity
Published: 2024-04-24 01:52:07

To improve the focus of your nested `tmux` you may hide the status bar.

Edit `~/.tmux.conf` and add the following code and restart the tmux
```
# Toggle status bar visibility
bind b run-shell "tmux setw -g status \$(tmux show -g -w status | grep -q off && echo on || echo off)"
```

Now you may use `Prefix+b` by default it should be `ctrl+bb` I did it `b` for bar, you may change it for your convenience.
Git commands | underrated
Tags: git
Published: 2024-04-24 01:44:28

## Save token
open git config by `$git config -e` and replace <TOKEN> with your GitHub token
```
[remote "origin"]
        url = https://<TOKEN>@github.com/org/repo.git
        fetch = +refs/heads/*:refs/remotes/origin/*

```
## Rapid fixups using `autosquash`

```
# To update last commit
git commit --amend --no-edit 
```

```
# to update old commit
git commit --fixup=<HashOfCommitWhichNeedsToBeSquashed>
git rebase -i --autosquash <base commit>
```

## Force push changes

```
git push --no-tags --set-upstream origin $(git rev-parse --abbrev-ref HEAD) --force
```

## Copy files from container to host and vice versa
```
docker cp <container_id>:/path/to/container/file/or/directory /path/on/host
docker cp my_container:/app/file.txt /host/path
```
So Long Venerable Z80 and Thanks For All the Fish!
Tags: electronics, assembly, programming, diy
Published: 2024-04-24 01:36:48


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

This week Zilog announced that the Venerable Z80 processor will be discontinued and will not be manufactured as a DIP anymore, the brainchild of Federico Faggin one of the creators of the original Intel 4004, the Z80 is a landmark in processors and was used in a variety of appliances, computers, and hardware that we cannot even imagine like the TRS-80, the CollecoVision, Sharp Hotbit, Gradient Expert, TK90X, the Sinclair ZX Spectrum, and many others.


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

Widely used in the hobbyist, maker, and electronics scene this little marvel will be missed by a legion of people who learned to love it in his tenure of 48 years in the market, the way it works, his small instruction set, and the versatility that has been introduced with him.

But not all is tears about this 8-bit giant, the Z80 architecture will continue to be used for a long time in the form of FPGA implementations, and as an example to teach processor architecture, and probably we will see clones in the market if the opportunity appears.

Can appear foolish to say goodbye to a small piece of silicon, but for people from an electronics background is a part of our history that will not be forgotten, from a time when we had to assemble our own computers or create our small systems.

Nothing more to say.

So Long Venerable Z80 and thanks for all the fish! You will be missed but will stay with us for long, long time.

[Z80 Product line: Z84C00 - End of Life/Last Time Buy Notification](https://www.mouser.com/PCN/Littelfuse_PCN_Z84C00.pdf)
Cloudflare Workers - Serverless Hosting
Tags: cloudflare, workers, serverless, node
Published: 2024-04-24 01:20:47

## Prerequisites
Set up a Cloudflare account [Read more](https://bijayshrestha.medium.com/a-beginners-guide-to-serverless-angular-using-cloudflare-workers-2549a8fb59b5)

### Installations

1. Install nvm


```
sudo apt install curl
bash
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
#### ctrl+d o back to ZSH
source ~/.zshrc
nvm --version
```



2. Install node using nvm 
If node is already installed, you might want to uninstall it first and reinstall it using nvm —> to save yourself from ‘permission denied’


```
nvm ls-remote 
# From the list, install the latest stable version of node.
# At the writing this, it is v20.9.0 (Latest LTS: Iron)
nvm install 20.9.0
```


`npm i @cloudflare/wrangler -g` or for latest version `npm install wrangler --save-dev`

Part 3:
Create a Sample Angular project, and

Part 4:
Integrate Cloudflare Workers with Angular/React application

Create Project
`npm create cloudflare@latest my-project -- --framework=angular`

Run Locally
`npm serve`

Deploy
`npm run deploy`




## Troubleshooting
1. If in case the wrangler is not installing then follow the blog [1] of Bijay Shreshta


**References**
[1] https://developers.cloudflare.com/pages/framework-guides/deploy-an-angular-site/
Empower your Projects with Face Recognition SDK: 9 Must-Have Features for Developers
Tags: machinelearning, datascience, computerscience, python
Published: 2024-04-24 01:13:50

Face recognition SDK is critical in a variety of initiatives, from improving security to transforming customer experiences. This breakthrough technology has quickly made its way into a wide range of applications, offering increased efficiency, convenience, and security across industries. The face recognition SDK (software development kit) is at the heart of this transformation, allowing developers to easily integrate the power of facial recognition into their apps.

Read full article here.
https://faceplugin.com/face-recognition-sdk-by-faceplugin/
manpage art, man is still alive
Published: 2024-04-24 00:08:53

![arttime manpage figure-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9bhi2tx1z1x2h2ln3h6.png)

As developers we have all interacted with an obscure-looking documentation system that is invoked with an incantation that starts with ``man``, for instance ``man less`` (no pun intended).

While we have moved on to more sophisticated documentation mediums with graphics and etc, ``man`` is still alive and actually getting better (newly added hyperlink support).

It wasn't until I had to write a manpage for my project that I dived deeper into its capabilities and limits.

Unlike its modern peers, ``man`` runs in a text-only medium (given the nature of terminals). Also, none of the manpages I had come across in past had (ascii) diagrams in them. So I asked if it is possible to show text art in man pages. The short answer is: yes!

Below is a collection of figures from [arttime](https://github.com/poetaman/arttime)'s manpage. It can be opened with ``arttime -m`` or ``man arttime`` from terminal. You can also see arttime's manpage (without colors) in your web browser: [arttime manwebpage](https://raw.githubusercontent.com/poetaman/arttime/main/share/arttime/doc/arttime.1.txt).

Happy man-paging!

![arttime manpage figure-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/56um8rlf237tfnqlohqx.png)


![arttime manpage figure-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ukxn1hu32h37w3z8snck.png)


![arttime manpage figure-4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5g46dn5bpvsypzv74wbd.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1hmablwp0jh2hwowwmf.png)
Lovely technology logos
Tags: services, github, stickers, logo
Published: 2024-04-24 00:04:30

Here's some [lovely technology logos](https://github.com/SAWARATSUKI/ServiceLogos) reimagined by [@sawaratsuki1004](https://twitter.com/sawaratsuki1004)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/305sac1nmyuit3l138ro.jpeg)

These are free for personal and non-commerical use. So you can print these stickers yourself to stick on your computers.

My personal favorite:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ej3mktnt2orn1rh1l3yl.png)
Welcome Thread - v273
Tags: welcome
Published: 2024-04-24 00:00:00

---
published_at : 2024-04-24 00:00 +0000
---
![Rainbow illustration that says "hi"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awkxmswj4ic5kl9qcxy5.gif)
---

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself. 

2. Reply to someone's comment, either with a question or just a hello. 👋

3. Share your wins from this week in our weekly ["What was your win this week?](https://dev.to/t/weeklyretro) thread.
Google Workspace Developer Summits - 2024 - Boston and Berlin
Tags: google, googleworkspace
Published: 2024-04-24 17:44:13

---
title: Google Workspace Developer Summits - 2024 - Boston and Berlin
published: true
date: 2024-04-24 00:00:00 UTC
tags: google,googleworkspace
canonical_url: https://justin.poehnelt.com/posts/2024-workspace-developer-summits/
---
![Signup form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jonzxfjkgkwsuyygedco.png)

Save the date for the Google Workspace Developer Summits in 2024!
- 🇺🇸 Boston - September 12, 2024
- 🇩🇪 Berlin - September 17, 2024

> The event is all about building solutions on the Google Workspace platform, learning about new platform capabilities, and connecting with the Workspace developer community.

The group of developers that come to this event are typically building solutions on the Google Workspace platform and have an incredible depth of knowledge about the platform. I sometimes feel like I’m the least knowledgeable person in the room when I attend these events even though I’m on the Google Workspace Developer Relations team!

If you or anyone you know is interested, please [fill out the interest form](https://docs.google.com/forms/d/e/1FAIpQLSeHrTcEyMFl3BgTUDc_LzQrwvEvBIB-pN1pmspeBoXJMVvwRQ/viewform) to have early access to register.

Topics might include:

- How to combine Google Workspace and Vertex AI
- How to create Google Workspace Add-ons
- How to create Workspace Add-ons using alternate runtimes
- How to create Chat apps
- How to automate tedious tasks with Apps Script
- How other developers have successfully created Workspace solutions
- Apps Script tips and tricks for advanced users
- How to combine AppSheet and Apps Script
- How to publish add-ons, integrations, and apps on the Google Workspace Marketplace
- How to get started with Apps Script
- Authorization and authentication deep-dive
- Best practices on how to monetize my Google Workspace Marketplace app
Google Sheets API - IMPORT / Image - Bypass User Consent
Tags: google, googleworkspace, sheetsapi
Published: 2024-04-24 17:32:35

---
title: Google Sheets API - IMPORT / Image - Bypass User Consent
published: true
date: 2024-04-24 00:00:00 UTC
tags: google,googleworkspace,sheetsapi
canonical_url: https://justin.poehnelt.com/posts/sheets-api-import-image-external-url/
---

Accessing data from external parties in Google Sheets is now blocked by default. This change affects any spreadsheets that use the `IMAGE` or `IMPORT` functions to import data from external URLs. Users will now need to grant permission to access external data before the functions can be used. This warning shows up as:

> Warning: Some formulas are trying to send and receive data from external parties.

This issue was reported in the [Sheets API Issue Tracker](https://issuetracker.google.com/issues/324798866). The change is intended to improve privacy and security by preventing unauthorized access to external data sources.

Developers using the Sheets API and creating PDF reports or similar will need to make a change to the spreadsheet to work around this. The engineering team at Google has provided the following guidance:

> We are working on adding options to the Google Sheets API and the Apps Script Sheets integration to support acknowledging the import warning on a per-document basis (essentially mimicking the user flow, although it can be done in advance of adding any IMPORT-related formulas).

As part of the [Spreadsheets v4 API](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets#spreadsheetproperties), there is now a new property:

```js
{
  "importFunctionsExternalUrlAccessAllowed": boolean
}
```

The comment for this property reads:

> Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true.

The property is set to `false` by default. Developers can use the `spreadsheets.batchUpdate` method in the Sheets API to set this property to `true` and allow access to external URLs for the `IMAGE` and `IMPORT` functions without requiring user consent.

```js
{
  "requests": [
    {
      "updateSpreadsheetProperties": {
        "properties": {
          "importFunctionsExternalUrlAccessAllowed": true
        },
        "fields": "importFunctionsExternalUrlAccessAllowed"
      }
    }
  ]
}
```

After this change, the warning message will no longer appear, and the functions will work as expected!