teleren/devto huggingface dataset:
Fix Permission denied (public key) With Gitlab Windows
Tags: git, devops, webdev, programming
Published: 2022-05-06 02:43:37

Recently I need to checkout a new repo from a self-hosted Gitlab server. I did the usual thing: 

* Generate a pair of ssh keys using `ssh-keygen` (since I'm on a new Windows machine). If you already have the ssh keys (try ls in your ~/.ssh and you see `id_rsa` and `id_rsa.pub`), then you don't need to generate the key pairs again.
* Add it to the SSH key section of Gitlab

But still, I got the error:

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

Normally, it should work, right? Yes, I've done this countless time with GitHub, Gitlab, Bitbucket... and had no issue.

By the way, the account has 2FA enabled.

I don't know the reason for this but I have a workaround.

# Access to Gitlab using personal access token

The workaround is to use Gitlab's personal access token. I haven't tried this on Github (since it works perfectly with SSH key) but I guess it should work too.

The first step is to generate a personal access token:

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

Then, enter the name of the token and check `api`

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

Then click on Create personal access token and you will get a token to use:

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

Now, head back to your repository and copy the standard https URL. It should look something like this:
```
https://git.some-server.com/group/repo/repo-name.git
```
You need to modify that URL a bit using your newly created token:
```
https://<token_name>:<token>@git.some-server.com/group/repo/repo-name.git
```

Now, I can use that url to clone the repo:


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

In case you already have the repo, you just need to update the remote url
```
git remote set-url origin https://<token_name>:<token>@git.some-server.com/group/repo/repo-name.git
```

Then you can pull, push normally.

# Conclusion

That's it! You can continue working on your repo again. I still don't know why adding ssh didn't work but using the personal access token is an acceptable work around. 

One thing I don't like about this method is any one who can access to your machine can run:

```
git remote -v
```

And see your access token. That person then can use the credentials to do what you can on your repo.

So, lock your screen when you are not at your computer :D

---
If you enjoy this post, make sure to check my blog out at https://datmt.com. I wrote about #programming stuffs there :)
Using Sass'/SCSS' %Placeholder Selectors for Same-Sheet Repeatable Styling
Tags: webdev, scss, sass, css
Published: 2022-05-06 02:34:07

### Skip ahead
[Refresher on Mixins](#refresher-on-mixins)
[The Problem](#the-problem)
**[Solution: Placeholder Selectors](#solution-placeholder-selectors)**

---

## Refresher on Mixins
A `@mixin` is an _At Rule_ feature of [SASS/SCSS](https://sass-lang.com/documentation/at-rules/mixin) that allows you to define styles as though they were contained in a global class that can be accessed from other style sheets.

As a basic example, you write them like this (typically in a style sheet called `mixins.scss`):
```scss
// mixins.scss
@mixin guest-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid orange;
}
```

To access them from another location, you import the `@mixin` style sheet and use `@include` like so:
```scss
// about.component.scss

@import '../scss/mixins.scss';

img {
  @include guest-avatar;
}
```

---

# The Problem
* You can't reference a `@mixin` from within the same style sheet
* Sometimes you want repeatability so that you can make adjustments to styles at the top of the style sheet only (going beyond basic `$variables`)

---

# Solution: Placeholder Selectors
With placeholder selectors you can define the same kind of pseudo class with a `%` in front of the selector:
```scss
// some.component.scss

%rounded-top {
  border-radius: 8px 8px 0px 0px;
  padding: 1rem;
  padding-bottom: 3rem;
}
```

Now you can reference the selector somewhere on the same style sheet _below_ where it was defined:
```scss
// some.component.scss

%rounded-top {
  border-radius: 8px 8px 0px 0px;
  padding: 1rem;
  padding-bottom: 3rem;
}

.bottom-sheet {
  @extend %rounded-top;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
```



That's it. That's all.

Ria
Turtle studies
Tags: turtle, tutorial, 100daysofcode, python
Published: 2022-05-06 02:10:55


##today notes
Turtle Graphics 
1.screen usage 
2.change color of the turtle logo
3.Tkinder with GUI
4.Aliasing modules (as)
eg : import tkinder as tk
5.Pyhton Tuples 
tuple like as stone you can't change the values , it is immutable 
___usage of Tuple___
-creating a color scheme for your web site
-a list thst you to stay constant

>to convert in list 
list(my_tuple) 
6.colormode() This function is used to return the color mode or set it to 1.0 or 255. (r, g, b) values of color triples have to be in range 0 to c mode







*Extra studies*
1. double quotes are used for string representation and single quotes are used for regular expressions,
2.turtle.setheading(angle):	Sets	the	orientation	of	the	turtle	to	angle.	Here	are	some	
common	directions	in	degrees:	0	(east),	90	(north),	180	(west),	270	(south).
OpenSea Stream API a NEW Websocket-based Service
Tags: nft, blockchain, api, web3
Published: 2022-05-06 02:09:50

⚡️ Today OpenSea is launching a beta version of the Stream API, a new websocket-based service that enables developers to receive events as they occur across our marketplace.

We’ve built the Stream API to support a range of use cases that rely on dynamic data, such as price fluctuation, listings, bids and ownership changes. Instead of polling for updates, you subscribe to receive events as they occur.

Developer docs: [https://docs.opensea.io/reference/stream-api-overview](https://docs.opensea.io/reference/stream-api-overview)

The Stream API makes it easier to build new features such as:

- Push notifications to alert people when they receive new bids
- Activity feed that provides a timelines of sales from a collection
- Real-time dashboard that visualizes key trends and metrics

We’ve created a JavaScript SDK to manage connections and subscriptions to the Stream API and its events: [https://github.com/ProjectOpenSea/opensea-stream-js-sdk](https://github.com/ProjectOpenSea/opensea-stream-js-sdk)

And a example where we’ve used the Stream API to send events to a Discord webhook: [https://github.com/ProjectOpenSea/opensea-stream-discord-webhook](https://github.com/ProjectOpenSea/opensea-stream-discord-webhook)

To learn more, check out our blog post: [https://nft.mirror.xyz/HhXSvsS7ZhVns6FuJB1rUGP53gW-qDVCv5gfx9cDGco](https://nft.mirror.xyz/HhXSvsS7ZhVns6FuJB1rUGP53gW-qDVCv5gfx9cDGco)

Reach out on [Discord] (https://discordapp.com/channels/397566282729390110/434175585745633280) if you have any questions, issues or feedback.  

We can’t wait to see what you build!🏗️
Copy File Menggunakan SCP Pada Linux Ubuntu
Tags: tutorial, linux
Published: 2022-05-06 01:19:22

<!-- wp:paragraph -->
<p>Pada Linux ubuntu kita dapat melakukan copy file namun ada kalanya kita ingin melakukan copy file dari satu mesin ke mesin server lainnya. Misal pada contoh kasus anda ingin melakukan copy file dari satu server ke server lain jika anda mendownload dulu filenya ke laptop baru di upload ke server satu lagi maka tidak efisien</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><strong>mengapa tidak efisien ?</strong></h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li>anda harus mendownload dulu filenya dari server source file baru melakukan upload ke destination server</li><li>terbatasnya speed internet kita berbeda dengan internet di server yang pada umumnya sangat cepat</li></ol>
<!-- /wp:list -->

<!-- wp:heading -->
<h2><strong>Solusi Copy Langsung dari server source file ke destination server</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>menurut saya jika anda ingin copy file server to server baiknya di copykan langsung saja jadi tidak perlu di download dahulu ke laptop anda</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>salah satu cara yang paling bagus menurut saya adalah menggunakan command&nbsp;<strong>scp</strong>&nbsp;pada linux ubuntu anda dapat melakukannya dengan cara sbb :</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code class="">scp /var/lib/mysql/data101/*.* root@147.139.177.113:/var/lib/mysql/data101/</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>dari perintah diatas kita akan melakukan copy file database mysql dengan namadatabase&nbsp;<strong>data101&nbsp;</strong>ke server yang berada di host berbeda yaitu ip&nbsp;<strong>147.139.177.113</strong>&nbsp;dan file hasil copy akan di copykan ke directory&nbsp;<strong>/var/lib/mysql/data101</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>dengan perintah diatas maka kita akan melakukan proses copy server to server dan proses copy file akan jauh lebih cepat dikarenakan internet di server juga sangat cepat</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Dapatkan Tutorial Menarik Lainnya Di&nbsp;<strong><a href="https://midteknologi.com/" rel="noreferrer noopener" target="_blank">MID Teknologi</a></strong></p>
<!-- /wp:paragraph -->
Javascript Animation 9
Tags: javascript, webdev, css
Published: 2022-05-06 01:04:59

Whatever you do on Javascript, you have to understand the roots and focus on the basic knowledge.
# 1. Galaxy preview  
{% codepen https://codepen.io/php-hacker/pen/GRMxEBw %}
# 2. Typing text effect  
{% codepen https://codepen.io/php-hacker/pen/GRMxEdY %}
# 3. Routing
{% codepen https://codepen.io/php-hacker/pen/oNGqBZe %}
# 4. Particle effect    
{% codepen https://codepen.io/php-hacker/pen/WNZzRrP %}
# 5. Drag   
{% codepen https://codepen.io/php-hacker/pen/PoJRWZa %}
My favorite git Aliases & how configure it
Tags: tutorial, beginners, git, productivity
Published: 2022-05-06 00:30:09

# Shortcuts (aka Alias)

On your .gitconfig file create/modify "alias" section like below:

### GLOBAL LEVEL: –global

- WINDOWS: C:\Users\{user_name}\.gitconfig
- LINUX: ~/.gitconfig
- MAC: ~/.gitconfig

### SYSTEM LEVEL: –system

- WINDOWS: C:\Program Files\Git\etc\gitconfig.
- LINUX: [path]/etc/gitconfig
- MAC: /usr/local/git/etc/gitconfig

## .gitconfig file

[alias]
```sh
g="git"
gl="git log --pretty=oneline --graph --decorate --all"
gs="git status"
ga="git add"
gb="git branch"
gc="git commit"
gco="git checkout"
gp="git pull"
gps="git push"
gr="git rebase"
gri="git rebase -i HEAD~5"
```
## HOW CREATE NEW ALIAS
```sh
git config --global alias.amend ci --amend
git config --global alias.dfs "diff --stat"
```

## MORE ALIAS EXAMPLES

```sh
alias gc='git checkout'
alias gcm='git commit -m'
alias gs='git status'
alias ga='git add --all'
alias gp='git pull --rebase'
alias gb='git branch -vv'
alias gr='git remote -v'
alias grt='git reset --hard'
alias gpub='git push origin publish'
alias grp='git rebase publish'
alias gdev='git push origin dev'
alias gd='git branch -D'
alias gm='git merge'
alias gh='git push'
alias gda='git branch | grep -v "develop" | grep -v "release" | xargs git branch -D'
alias gf='git fetch'
alias gl='git log -3'
```
Can a React usestate update be nested in another useState functional update?
Tags: react, usestate, useeffect, purefunction
Published: 2022-05-06 00:12:30

There are `n` items the user can vote on. There are two React states:

- votes is an array of the user's votes on every item.
```const [votes, setVotes] = useState({});```
- voteChanges indicates how many times the user changed their votes on any of the items.
```const [voteChanges, setVoteChanges] = useState(0);```

We have a database listener defined in a `useEffect`. When votes are added/changed in the database, the listener gets called. We need the state `votes` to compare every new vote with its previous value in votes to decide whether to set `voteChanges` to `true`. However, we cannot define `votes` as a dependency in `useEffect`, otherwise we will end up in an infinite loop. To get access to the current value of `votes`, we use its functional update. Is it okay to call `setVoteChanges` inside the functional update of `setVotes`? If no, why and how should we solve this problem?

```
useEffect(() => {
    databaseListener((changes) => {
      setVotes((oldVotes) => {
        const oVotes = { ...oldVotes };
        for (let change of changes) {
          const itemId = change.id;
          const newVote = change.vote;
          if (oVotes[itemId] !== newVote) {
            setVoteChanges(oldCount => oldCount + 1);
          }
          oVotes[itemId] = newVote;
        }
        return oVotes;
      });
    });
  });
```
Javascript Animation 8
Published: 2022-05-06 00:23:24

Whatever you do on Javascript, you have to understand the roots and focus on the basic knowledge.
# 1. Landscape  
{% codepen https://codepen.io/php-hacker/pen/ZEXxrqZ %}
# 2. Star  
{% codepen https://codepen.io/php-hacker/pen/xxXWreP %}
# 3. Lighting Christmas Tree
{% codepen https://codepen.io/php-hacker/pen/xxXWrBP %}
# 4. Bored   
{% codepen https://codepen.io/php-hacker/pen/rNGdwPj %}
# 5. Loading Animation   
{% codepen https://codepen.io/php-hacker/pen/XWeEgyM %}
Javascript Animation 7
Tags: javascript, css, webdev
Published: 2022-05-06 00:17:41

Whatever you do on Javascript, you have to understand the roots and focus on the basic knowledge.
# 1. Download Speed  
{% codepen https://codepen.io/php-hacker/pen/rNGddaN %}
# 2. Random colour  
{% codepen https://codepen.io/php-hacker/pen/jOGzzOd %}
# 3. Pull-down refresh
{% codepen https://codepen.io/php-hacker/pen/bGovLzK %}
# 4. Particle effect   
{% codepen https://codepen.io/php-hacker/pen/OJxvQaz %}
# 5. Animation  
{% codepen https://codepen.io/php-hacker/pen/dyVmdwp %}
Identifying Random Uploaded Form Files
Tags: cfml, coldfusion, java
Published: 2022-05-06 00:15:42

I'm developing a flexible processing CFML script that accepts (authenticated) FORM posts and processes the data. The data is stored based on form field prefixes, but I don't have any hints regarding which fields may contain a file when processing a "multipart/form-data" form posts.  I found Ryan Stille's blog post from 2012 entitled "[Getting the client filename before using cffile](http://www.stillnetstudios.com/get-filename-before-calling-cffile/)", but it didn't work with Lucee.

I've been using Ryan's Adobe ColdFusion-only UDF for a couple years, but I need a cross-compatible solution since I'm attempting to migrate some projects to Lucee.  I searched & couldn't find anything, so I thought I'd try my hand at it. _(I'm not 100% sure if this is the best way to do it since it uses an undocumented method.)_

The benefit to this approach is that it returns a single struct containing keys that match all form "file" field names with extra information identifying the original filename, type, size and temporary file path.  Enjoy!

## getFormFiles UDF (cross-compatible cfml)

https://gist.github.com/JamoCA/524b68b4fbbbf884da7f631e697defbd

{% gist https://gist.github.com/JamoCA/524b68b4fbbbf884da7f631e697defbd %}
Blog: Puppet Runtime Manager 0.2.0 Release 🤘
Tags: puppet, devkit, developer
Published: 2022-05-06 16:29:38

---
title: Blog: Puppet Runtime Manager 0.2.0 Release 🤘
published: true
date: 2022-05-06 00:00:00 UTC
tags: puppet,devkit,developer
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/posts/prm-0-2-0-release/
---

We are happy to announce that version 0.2.0 has been released. 🎉

With this release we introduce the `build` and `validate` commands along with a number of [other fixes](https://github.com/puppetlabs/prm/blob/main/CHANGELOG.md).

## Build 🏗

After developing a tool you generally want to share it with the wider community or your team.

Let’s take a quick look at what that might look like.

`prm build` provides functionality that will package the current directory and ensure that the resulting artefact is a valid PRM tool.

A basic project should contain at least a `prm-config.yml` and a `content` directory.

![](https://i.imgur.com/1VTWFIt.png)

Assuming that your project structure looks OK, you can run `prm build`.

![](https://i.imgur.com/6RgJ0JD.png)

The resulting archive will be created in the `pkg` directory by default. However you can change the location that the package is created in by providing `--targetdir` flag.

![](https://i.imgur.com/OCpnxuB.png)

Your package can now be [installed](https://puppetlabs.github.io/content-and-tooling-team/docs/prm/usage/tool_installation/#local-archive) by anyone with `prm install`!

## Validate ✅

A validator is a tool which can read and validate a codebase of Puppet content.

`prm validate` enables a content creator to quickly validate Puppet content. This command allows you to run multiple validation tools serially or concurrently.

The results of validation can either be outputted to a log file or to the terminal.

Running the validate command will look something like this:

```
$ prm validate --codedir . --group syntax_validation
3:49PM INF Found tool group: syntax_validation
3:49PM INF Validating with the metadata-json-lint tool
3:49PM INF Validating with the puppet-syntax tool
3:49PM INF Validating with the puppet-lint tool
TOOL NAME | VALIDATION EXIT CODE | FILE LOCATION
---------------------+----------------------+--------------------------------------------------------------------------------
puppet-syntax | 1 | .prm-validate/syntax_validation/puppet-syntax_2022_April_26_16-49-59.log
metadata-json-lint | 0 | .prm-validate/syntax_validation/metadata-json-lint_2022_April_26_16-49-59.log
puppet-lint | 0 | .prm-validate/syntax_validation/puppet-lint_2022_April_26_16-49-59.log
3:49PM ERR Validation returned 1 error

```

Check out the [docs](https://puppetlabs.github.io/content-and-tooling-team/docs/prm/usage/validate/) for more information on PRM and how to use these new features!

## Feedback 🗣

If you try PRM and notice any bugs, have ideas for future features, or would like to learn more about the development, feel free contact anyone from our team via [community Slack](https://slack.puppet.com/) or submission of a [GitHub issue](https://github.com/puppetlabs/prm).
15+ Command Line Hot Keys You Didn't Know About
Tags: hotkey, beginners, shortcut, todayisearched
Published: 2022-05-05 23:57:15

1. Ctrl + R = search your command history
2. Ctrl + W = deletes a single word
3. Ctrl + U = deletes from the cursor to the beginning of the line
4. Ctrl + K = deletes from the cursor to the end of the line
5. Ctrl + A = sends the cursor to the beginning of the line
6. Ctrl + E = sends the cursor to the end of the line
7. Ctrl + L = clears the terminal
8. Ctrl + D = closes the terminal
9. Ctrl + F = moves the cursor forward one character
10. Ctrl + B = moves the cursor background one character
11. Alt + F = moves the cursor forward one word
12. Alt + B = moves the cursor backwards one word
13. Alt + T = switches two words next to each other
14. Alt + U = changes the characters of the word next to the cursor to lowercase
15. ALT + B = changes the characters of the word next to the cursor to uppercase
16. Ctrl + S = stops all the output to the screen
17. Ctrl + Q = resumes the output after stopping with Ctrl + S
18. Ctrl + XX = move between the beginning of the line and the current position of the cursor
19. Ctrl + _ = undo your last key press


Happy coding!
Day 27: Paper work
Published: 2022-05-05 23:16:09

Hi!
noticed that I'm 3 days away from my first month milestone?
Today was a day of paper work and I made some progress on my paper something that I'm more proud of is the ability to trust my writing capabilities without copying much from internet articles. I was able to complete a chapter and hopefully I will Finish with everything by tomorrow 
I also got a basic understanding to sockets about emitting and catching events which I think will be handy when I get to it.
i don't know when I'm gonna be real back into work but i can't wait 

signing off...
The Most Hated PGL
Tags: discuss, webdev, vba, programming
Published: 2022-05-05 23:11:00

## VBA and Friends

- 75% of users _hate_ Visual Basic A (classic)
- Its intended _(and only legitimate)_ purpose exists inside of a product
- Microsoft is awful (duh)
- Sad attempt at object oriented development
- Insanely slow

_Its performance is terrible and no serious projects should be written in this language._

### Extremely difficult to learn as a new programmer

## # "VBA has a place in development because it is easier to learn." 
The opposite seems to be true:
- Unique logic and syntax
- Poor OOC support
- Lots of macros, meaning that lots of code is hiding under the hood and difficult to debug.




### But why would you HATE a programing language? 

To put it simply, "...it is entirely written by idiots" -Stuart McCormack on _Visual Basic Application_. The slow nature of its macros and irritating lack-of quality of life features cements most users from apathetic to hateful.

Sources:
https://datascopic.net/5-against-vba/
https://www.quora.com/Is-VBA-a-bad-language
https://boxbase.org/entries/2014/jul/28/vba/

apologists: 
https://rubberduckvba.wordpress.com/2019/04/10/whats-wrong-with-vba/
Cinco De Mayo Greeting (Shareable)
Tags: augmentedreality, 3d, beginners, tutorial
Published: 2022-05-05 22:44:25

<center>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oerh0gvikw06t1hzv6yk.gif)
Share this [link](https://go.echo3d.co/RvYg) or scan this QR code to wish someone a happy Cinco De Mayo! 🎸

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

</center>

***

To learn more about creating AR apps without code or downloading an app, visit the [echo3D docs](https://medium.com/r/?url=https%3A%2F%2Fdocs.echo3d.co%2F).

To make your own, sign up for echo3D for free [here](https://medium.com/r/?url=https%3A%2F%2Fconsole.echo3d.co%2F%23%2Fauth%2Fregister).

To recreate this, follow this [short tutorial](https://medium.com/echo3d/create-an-ar-experience-and-share-with-a-qr-code-link-f02e63114bbb).

Special thanks to [FreePik](https://medium.com/r/?url=https%3A%2F%2Fwww.freepik.com%2Ffree-vector%2Fhand-drawn-cinco-de-mayo_7316072.htm%23query%3Dcinco%2520de%2520mayo%26position%3D0%26from_view%3Dsearch) for the graphic!

**More Tutorials**
- [Get a Quarantine Dog…in AR!](https://medium.com/echo3d/get-a-quarantine-dog-in-ar-8383ea55376b)
- [How to Create 3D Content and See it in AR (FREE & NO CODING REQUIRED)](https://medium.com/echo3d/how-to-create-3d-content-and-see-it-in-ar-free-no-coding-required-369e5b4a4b3e)
- [Make a Valentine's Day Slideshow in AR](https://medium.com/echo3d/make-a-valentines-day-slideshow-in-ar-free-and-no-code-c1e35a4206d4)

***

>*echo3D (www.echo3D.co; Techstars 19') is a cloud platform for 3D/AR/VR that provides tools and network infrastructure to help developers & companies quickly build and deploy 3D apps, games, and content.*

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