teleren/devto huggingface dataset:
How to spoof your MAC address on macOS
Tags: mac, networking, cybersecurity
Published: 2022-04-03 15:42:56

I upgraded to Monterey recently. For some reason spoofing my MAC address to extend the time on the free WiFi priced into my $5 coffee has become a lot harder.

Before I had one magic ifconfig command to do it, now I have to run four different commands:

__Disconnect from the wifi__

```sh
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
```

__Change my lladdr__

My interface is always `en0`, and I just change the last digit of my MAC address. Holding option while clicking on the wifi menubar tray shows both my interface and MAC address.


```sh
sudo ifconfig <interface> lladdr <new MAC address> 
```

__Change my ether__

```sh
sudo ifconfig <interface> ether <new MAC address> 
```

__Run ifconfig to see if the ether value for my interface changed__

```sh
ifconfig
```

Now I can reconnect to my favorite insecure wifi. The wifi menubar tray still shows my old MAC address, but the public network sees the spoofed value from ifconfig.
Webserve: a tiny , extensible web server
Tags: go, webserver, webdev, opensource
Published: 2022-04-03 14:57:59

**SELF PLUG**
This morning I got tired of the web severs (details **NOT**) important on my windows laptop.

soo......


I did the most sensible thing.

I wrote my own(in go)!

It's called webserve

{% embed https://github.com/Pandademic/webserve %}

(all details on github)

bye!
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
no not actually....

you really thought I'd leave you without details??!?!?!?!

I will actually

just check github

it's only 24 lines of trivial go code for you to read

actually bye this time
Brutalist-Minimalist
Published: 2023-09-09 19:03:46

---
title: Brutalist-Minimalist
published: true
date: 2022-04-03 14:57:52 UTC
tags: 
canonical_url: https://themes.gohugo.io/themes/brutalist-minimalist-gohugo-theme/
---

Brutalist-Minimalist Theme Brutalist-Minimalist is a Hugo theme inspired by David Copeland’s manifesto on brutalist web design: Web “content true to its construction”. The idea here – being true to the construction or materials – is not to be confused with the trend to ugly and/or intentionally unusable design (I heard, that trend is dead, but on the other side there are some rumours). What the Brutalist-Minimalist theme tries to achieve is:
#Day 14 of solving [41/450] questions
Published: 2022-04-03 14:46:31

[bulls-and-cows](https://leetcode.com/problems/bulls-and-cows/submissions/)

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

[next-greater](https://leetcode.com/problems/next-greater-element-i/submissions/)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxx61h6pvup65wk5otr6.png)



 [daily-temperatures](https://leetcode.com/problems/daily-temperatures/)
My Rubber Duck
Tags: 100devs, beginners, productivity, codenewbie
Published: 2022-04-03 14:24:24

---
title: My Rubber Duck
published: true
description: One of the most curious things I did was start a photo series I called "Froglette." We dropped him in the mail and an unusual story began.
tags: 100Devs, beginners, productivity, codenewbie
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/scwi7lo0154ad0n8hczx.png
---

Years ago, I was into photography pretty heavily ... SLRs and the like.

## The Beginning

One of the most curious things I did was start a photo series I called "[Froglette](https://www.flickr.com/photos/fornal/sets/72157594537541683/)." He was this cute little character that we took photographs of in various situations.

Along the way, another photographer asked to photograph Froglette.

We dropped him in the mail and an unusual story began.

Froglette travelled the world for about two years, going from photographer to photographer. Occasionally he would come home to visit.

Then, we moved on with life ... as usual, things changed.

## The Idea

I recently had an odd thought rambling around in my head.

I've got a Batman Rubber Duck that I use for [Rubber Ducking](https://en.wikipedia.org/wiki/Rubber_duck_debugging).

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

I'd like to do something similar with him (Batman) ... a photo with the individual and a blog post. I think that unusual situational photographs would be fine (say sitting with a cactus in Arizona).

## The Rules

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

So, here are the basic rules ...

1. Write a Blog Post.
2. Include a photograph with you and the Batman Rubber Duck.
3. Include any other situational photographs with him you'd like.
4. Post the Blog and include a link as a Comment on this post.
5. Send him to someone else (or return him ... I'll include a card with my address).

Letting me know where he's going next would be a nice courtesy, but I am not going to make it one of the rules.

That's all.
Explanation Of Logistic Regression Theory
Tags: machinelearning, datascience, python, programming
Published: 2022-04-03 14:02:37


[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksatn4yac7jk1sr4epfb.png)](https://laid-back-scientist.com/en/logistic-theory)

The theory of logistic regression is explained in simple terms. 

Estimating the value of a parameter based on n pairs of observed data yields a model that outputs the probability of a response to any given numerical level.

👇
https://laid-back-scientist.com/en/logistic-theory
Use Pure Datatable in Laravel Livewire with AlpineJS
Tags: livewire, datatablelivewire, lavarellivewire, webdev
Published: 2022-04-03 13:56:42

Datatable is most popular Jquery plugin for make table easy with simple code.

```
<div x-data="app()" x-init="init()">
    <table class="table table-bordered" id="tableExample">
        <thead>
            <tr>
                <th>Name</th>
                <th>Email</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>

<script>
    function app() {
        return {
            dataTable(newData = "") {
                const data = newData !== '' ? newData : {!! json_encode($users) !!};
                $('#tableExample').DataTable({
                    data: data,
                    columns: [
                        {
                            data: 'name'
                        },
                        {
                            data: 'email'
                        },
                    ],
                    destroy: true,
                    language: {
                        searchPlaceholder: 'Search...',
                        scrollX: "100%",
                        sSearch: '',
                    }
                });
            },
            init() {
                const _this = this;
                _this.dataTable();
                Livewire.on("dataChanged", function(data) {
                    _this.dataTable(data);
                });
            }
        }
    }
</script>
```
you can changed new data from livewire function event with dataChanged function for retreive new data.
Setup CORS and Policy in Object Storage like s3 or anoter Object Storage with s3cmd
Tags: s3, s3cmd, objecstorage
Published: 2022-04-03 13:37:09

In your ~/.s3cfg

```
[default]
access_key = ACCESS_KEY
host_base = ENDPOINT
host_bucket = YOUR_BUCKET_NAME.ENDPOINT
secret_key = SECRET_KEY
```
or you can configure with command `s3cmd --configure` for new or reconfig default s3cmd

- **Set Policy**
create file policy.json

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:GetObjectVersion"
            ],
            "Resource": "arn:aws:s3:::BUCKET_NAME/*"
        }
    ]
}
```
you can customize policy.json according to you needs.

open terminal

```
s3cmd setpolicy policy.json s3://BUCKET_NAME
```

- **Set CORS**
create file cors.xml

```
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
```

Open terminal
```
s3cmd setcors cors.xml s3://BUCKET_NAME
```
Bash Initiate Redis Cluster Using Docker
Tags: beginners, shell, docker, redis
Published: 2022-04-03 13:38:46

---
title: Bash Initiate Redis Cluster Using Docker
published: true
date: 2022-04-03 13:17:05 UTC
tags: Beginner,shell,docker,redis
series: "Sunday Snippet"
canonical_url: https://clavinjune.dev/en/blogs/bash-initiate-redis-cluster-using-docker/
---

 ![Sunday Snippet #11 bash initiate redis cluster using docker](https://clavinjune.dev/img/sunday-snippet/image.png "Sunday Snippet #11 bash initiate redis cluster using docker")

```shell
#!/bin/sh
set -e

# get accessible docker bridge's IP
DOCKER_BRIDGE_IP=$(docker network inspect bridge | jq ".[0].IPAM.Config[0].Gateway" -r)
PORT_PREFIX="1700"
nodes=""

# create redis configuration for each node
for i in $(seq 1 6);do
    cat <<EOF > "/tmp/$i-redis.conf"
port $PORT_PREFIX$i
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
bind 0.0.0.0
cluster-announce-ip $DOCKER_BRIDGE_IP
cluster-announce-port $PORT_PREFIX$i
EOF

    # stop and remove existing redis
    docker container stop "myredis-$i" || true
    docker container rm "myredis-$i" || true

    # start new redis node containers
    docker run -v "/tmp/$i-redis.conf":/usr/local/etc/redis/redis.conf -d \
    --net=host --name "myredis-$i" redis:alpine3.15 redis-server /usr/local/etc/redis/redis.conf

    nodes="$DOCKER_BRIDGE_IP:$PORT_PREFIX$i $nodes"
done

# create cluster from existing containers
docker container exec myredis-1 redis-cli --cluster-yes --cluster create $nodes --cluster-replicas 1

printf "\n\n=> redis nodes:"

for node in $nodes; do
	echo "$node"
done
```
What is a smart contract resolver, when do you need it, and how to write a resolver?
Tags: blockchain, smartcontract, beginners, programming
Published: 2022-04-03 11:45:44

A resolver is a smart contract in which developers can embed their logic of "when" an execution should occur and what data should executors use for the execution. Gelato will query these resolvers periodically to check if it is time to execute. 

You need a resolver if
- You want to define the conditions of "when" Gelato should execute your task.
- You want to have different arguments for the function you are automating on each execution.

You do not need a resolver if
- You simply want to repeatedly call a smart contract function with the same or without arguments (e.g. every 1 hour). 
- If you just want Gelato to try to execute a particular function in case it does NOT revert

Watch the tutorial:

{% embed https://youtu.be/CTgmVLQlo1Q %}



--
Automate your smart contracts on Gelato Ops: https://app.gelato.network/
6 krasse WordPress SEO Tipps, die du bestimmt noch nicht kennst
Tags: seothemen, seo, wordpress
Published: 2022-04-03 18:29:13

---
title: 6 krasse WordPress SEO Tipps, die du bestimmt noch nicht kennst
published: true
date: 2022-04-03 12:54:19 UTC
tags: SEOThemen,seo,wordpress
canonical_url: https://bloggerpilot.com/wordpress-seo-tipps/
---

![6 krasse WordPress SEO Tipps, die du bestimmt noch nicht kennst](https://bloggerpilot.com/wp-content/uploads/2022/04/wordpress-seo-tipps.png)

Vermutlich verwendest du WordPress, weil es für dich eine einfache...

Der Original-Artikel erschien auf [6 krasse WordPress SEO Tipps, die du bestimmt noch nicht kennst](https://bloggerpilot.com/wordpress-seo-tipps/).

Bei der Optimierung von Meta-Tags gibt es eine Reihe von Dingen zu beachten. Die wichtigsten Aspekte der Meta-Tags sind die Schlüsselwortphrasen. Da Suchmaschinen Schlüsselwortphrasen bevorzugen, solltest du sie immer verwenden. Es ist wichtig, daran zu denken, dass Schlüsselwortphrasen kein Patentrezept sind. Suchmaschinen suchen nach Relevanz, also solltest du deine Meta-Tags nicht mit irrelevanten Schlüsselwörtern vollstopfen. Schließlich sollten der Titel-Tag und der Beschreibungs-Tag deine Ziel-Keyword-Phrasen enthalten.
for vs forEach vs map
Tags: javascript, webdev, beginners
Published: 2022-04-03 12:45:49

Hello 👋 , 

Javascript new bees may confuse on `for, forEach and map`. In this article i will explain difference between `for, forEach and map`.

### for
For is loop it is standard loop we can find in many programming languages.

Here is the syntax
```javascript
for(;;)
```
We have a control over iterations in for loop. We can continue iterations or break conditionally .

### forEach and map
`forEach` and `map` both are array methods. We can only use those on array.

map will accept call-back function and runs that function on each and every element in array and returns result array.

```javascript
const list = [1,2,3,4]
const inc = x => x + 1
const result = list.map(inc) 
result // [2,3,4,5]
```

like map, forEach also accept call-back function and runs that function on each and every element in array and it will not return any thing like map.

```javascript
const list = [1,2,3,4]

const inc = x => x + 1
const printIncrementedValue = x => console.log(x + 1)

const result = list.forEach(inc) 
result //undefined
list.forEach(printIncrementedValue) // 2,3,4,5
list.map(printIncrementedValue) // prints 2,3,4,5 and returns [undefined, undefined, undefined, undefined]
```
### How to choose ?

If you want to transform a list or expecting a result then you can pick `map`

```javascript
const strToDate = str => new Date(str)
const list = [1648989124036, 1648989124037, 1648989124038]
list.map(strToDate) // You will get date objects
```

If you are not expecting any return and you just want to perform a function  on array then `forEach` is good fit
```javascript
const list = [1648989124036, 1648989124037, 1648989124038]
list.forEach(console.log) // prints array
```

If you want control over array iterations or if you want iteration without array you have to pick 'for'

One best example is finding an element in an array. map will not fit for this case and forEach will work because we don't have control over that so we cannot break the iteration after finding an element. But with for loop we can break once we find it.
```javascript
const list = [1,2,3,4]

const find = (arr, ele) => {
 for(let i = 0; i < arr.length; i++){
  if(arr[i] === ele)
   return true
 }
 return false
}
find(list, 2) // Iteration will stop once element is found and returns true.
```

Cheers,
Happy coding!
How long did it take you to get comfortable with coding?
Tags: webdev, productivity, beginners, discuss
Published: 2022-04-03 12:07:17

I recently got a LinkedIn invitation from a random person. After accepting it I got a message from this person. It said:

> Hey Silvestar! I recently started to learn React and all the wonderful things that go with it. I really liked your write up about CSS auditors, lots of good links and info and very well written. I was just wondering how long it took you to get this comfortable with coding? Thanks.

At first, I wasn’t sure what to answer or should I answer at all, but then again, it didn’t cost anything for me to reply and possibly help this person. Here’s my reply:

> Hi,
>
> Thank you for the kind words.
>
> To answer your question honestly, it took several years to get comfortable with coding, especially when I started to learn new things. 
> For example, it took a year to get comfortable with PHP, then it took several months to get comfortable with HTML and CSS, then it took several months to get comfortable with jQuery, then it took several months to get comfortable with JavaScript, then it took several months to get comfortable with Angular2, and so on.
>
> Now, I am working mainly with HTML, CSS, and JavaScript, and I am in my maximum comfort zone. It took approximately 7-8 years. 
>
> But that was my journey. I bet you will have a completely different one.
>
> I hope I have answered your questions.

This person thanked me, and that was it.

But after that, the more I thought about it, the more I realized that I’m still not comfortable in some areas. For example, when I need to write a NodeJS script or lambda function, I am very uncomfortable, and I still don’t know if I am doing the right thing. The code works, but could it be better, more secure, and performant? 

That reminds me of one of my favorite scenes from one of my favorite shows, Peep Show. In it, Mark has a good hand in poker, but, Mark being Mark, he folds because _“there’s just no way of knowing for sure (if someone else has a better hand).”_ He is just not comfortable with the situation, and he gives up. On the other hand, Jez has a pretty bad hand, but, Jez being Jez, he goes all-in and bluffs the other guy with a stronger hand. He then says to himself: _“I’m really good at this without realizing how.”_ I love that quote, and I’ve been using it in my email signatures forever.

{% embed https://www.youtube.com/watch?v=6mSleXflIq8 %}

Getting comfortable with coding is definitively tricky and individual. So how long did it take you to get comfortable with coding?
Progress of Brainwashing Culture in America
Tags: economy, culture, america
Published: 2022-04-03 11:48:24


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

The special vocabulary, greenwashing and greenscamming are reserved for corporations that acknowledge the importance of environment preservation, yet, continue to cultivate the predatory culture for profit. Big corporations have adequate financial resources at disposal to create bogus jobs in order to skim more public tax dollars from government. 

A local example of greenwashing is McDonald spending thousands of dollars to advertise paper straws meaninglessly so that all cost can be used for tax reimbursement. Likewise, an example of greenscamming is Exxon; where, a fossil fuel industry funding bogus non-profit organizations since to disprove the legitimacy of climate emergency. 

Without shame, unelected public servants at the top of the food chain knowingly collude with elected government and corporate executives to ensure the crime is legalized so no one can be held accountable. The zionist cult culture requires like minded people to legitimize the financial crimes through legalization of criminal acts. 

Under taxation system, corporations are viewed as individuals but none of the criminal activity can be questioned. Like drug addicts, profit is an addiction that would motivate anyone to operate malice without guilt. If you feel that you do not fit in such culture, that is probably because you are person with conscience and moral decency. #culture #economy #environment
It's a primathon!
Tags: perl, python, theweeklychallange
Published: 2022-04-03 11:38:46

## Weekly Challenge 158

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-158/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-158/sgreen)

Happy 3rd birthday PWC. As we know, three is a prime number, which is the theme of this weeks challenges.

Two relatively straight forward tasks this week, so not much explanation required. Both tasks use a `is_prime` method which I took from a previous week. Given an integer, it will true True / False ('1' / undef in Perl) if that number is an integer.

## TASK #1 › Additive Primes

### Task

Write a script to find out all Additive Primes <= 100. Additive primes are prime numbers for which the sum of their decimal digits are also primes.

### My solution

I have a set (hash in Perl) called `primes` that has the primes found so far. We know that the sum of the digits will never be higher than than the number itself.

I loop from 1 to 100, add the number to the `primes` set. If the sum of the number is also a prime, I add it to the `additive_primes` list (array in Perl).

Finally I display the list as output.

### Example

```
$ ./ch-1.py 
2, 3, 5, 7, 11, 23, 29, 41, 43, 47, 61, 67, 83, 89
```

## TASK #2 › First Series Cuban Primes

### Task

Write a script to compute first series [Cuban Primes](https://en.wikipedia.org/wiki/Cuban_prime#First_series) <= 1000.

### My solution

For this task I have a counter `x` that starts from one. For each number, I calculate `3x² + 3x + 1` (taken from the wikipedia page). If that number is > 1000, I exit the loop. If that number is a prime, I add it to the `cuban_primes` list.

Like with the previous task, I end by printing the list. I notice that the example has a full stop at the end. Not sure if this is intentional or not.

### Example

```
$ ./ch-2.py 
7, 19, 37, 61, 127, 271, 331, 397, 547, 631, 919
```
Quirky thoughts about developing your dev stamina
Tags: productivity, programming
Published: 2022-04-03 11:22:27

How long can you code before exhaustion settles in?
How long before you remember taking a break?

So we're in the middle of a deadline rush and I can't think of a better time to sit back and consider this.

Normally, to beat mental exhaustion, I look into relaxation and meditation. Sure, these are worthwhile.

There's a catch though: these at first sight appear to be the straight opposite of mental training. They're about shutting the brain as much as possible, right? (oversimplifying this, but hang on)

Would mental *training* help?

The closest may be code gyms. If you haven't tried these little puzzle solving apps (mainly used to train for interviews), giving it a shot is definitely worthwhile.

Still, I think training for actual performance in actual programming tasks would be... ...different.

Code gyms are about internalizing logical puzzles and solving them *real fast*. They're about doing little brain twisters in limited time, with usually nothing caring that you then get off for the rest of the day (cause job-seeking, hey)

Training stamina for everyday coding tasks is going to be *something else*.

Until then, a tip for you!

Start looking into an issue BEFORE you make a branch for it. This will help you keep rested while working, and also keep your PRs neat. Here's why:

- Start looking into an issue...
- Make a PR
- Run into another, connected issue.
- Start fixing it, all the while not fully focusing on it...
- End up fixing 4 issues, and rolling them into one PR. And, guessed it: feeling mentally wrecked.

Another cause of brain tiredness in crunch time is because crunch requires keeping mental notes... or doesn't? When the kanban (your Trello, Jira, ...) feels too much, downscale: pull stickies/favorite local notes app (notepad, even) and write things down.

Stay focused, keep your brain as clutter-free as possible.

You can do it!