teleren/devto huggingface dataset:
Quick tip: embedding YouTube Videos in GitHub pages
Tags: github, youtube
Published: 2022-09-14 09:45:18

---
title: Quick tip: embedding YouTube Videos in GitHub pages
published: true
description: using an include file you can embed YouTube Videos in GitHub pages
tags: github,youtube
canonical_url: https://christianheilmann.com/2022/09/14/quick-tip-embedding-youtube-videos-in-github-pages/
---

![A youtube video embedded into a markdown file showing up on GitHub pages](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rm7pe03mppgnmyc0yj6f.png)

[GitHub Pages](https://pages.github.com/) is a great way to host some of your content online. All you need to do is to write some markdown files and tell GitHub to create it as a page. 

The problem is that you can't just add some HTML into your markdown to - for example - embed a YouTube video. It does work if all you include is the YouTube iframe, but when you work with professional markdown repos, this will be flagged up as an error or security problem.

A workaround that many people use is to [embed a linked preview of the video](https://codepo8.github.io/youtube-embed/demo-preview.html):

If your YouTube URL is https://www.youtube.com/watch?v=JLMbpiywVxQ the important part is the ID after the `v=`, in this case `JLMbpiywVxQ`.

You can then use the following markdown to embed a link to the video with a preview image of it. YouTube automatically creates these preview images.

```markdown 
[![Final video of fixing issues in your code in VS Code]
(https://img.youtube.com/vi/JLMbpiywVxQ/maxresdefault.jpg)]
(https://www.youtube.com/watch?v=JLMbpiywVxQ)
```
[![Final video of fixing issues in your code in VS Code](https://img.youtube.com/vi/JLMbpiywVxQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=JLMbpiywVxQ)

If, however, you want to embed the video in markdown files, you need to do a bit more. 

1. Go to the root of your GitHub repo with the markdown files and create a folder called `_includes`.
2. In this folder, create a file called `youtube.html`. Paste this HTML and CSS and save it.

```HTML
<div class="embed-container">
    <iframe width="640" height="390" 
    src="https://www.youtube.com/embed/{{ include.id }}" 
    frameborder="0" allowfullscreen></iframe>
</div>
<style>
.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style>
```
Now you can embed any YouTube video in your markdown files using the following:

```markdown
{% include youtube.html id="JLMbpiywVxQ" %}  
``` 

With the ID being the YouTube ID.

You can see this in action and fork the [youtube embed demo repository](https://github.com/codepo8/youtube-embed) if you don't want to do it by hand.
C++ STL in a Nutshell
Tags: beginners, programming, computerscience, cpp
Published: 2022-09-14 09:35:25

**I had written these codes as a note when I was learning STL for competitive programming. For better understanding, try to read the comments written with codes.**

Pair

```cpp
pair <int,string> pr;
pr = make_pair(2,"string"); // Initializing Method 1
pr = {2,"Hello"}; // Initializing Method 2 
pair <int,string> &pr2 = pr; // Used Reference // Not copy
pr.first = 10; // Initializing Method 3
	
pii pairArray[3]; // Array of Pairs
fo(i,3) cin>>pairArray[i].first>>pairArray[i].second;
swap(pairArray[0],pairArray[2]);
fo(i,3) cout<<pairArray[i].first<<" "<<pairArray[i].second<<endl;
```

Vector

```cpp
vector <int> v(5,3); // 3 3 3 3 3
v.push_back(1); // O(1) // 3 3 3 3 3 1
v.pop_back(); // O(1) // 3 3 3 3 3

vector <int> v1 = v; // O(n) // Try to pass by ref in fuction call
vector <int> &v1 = v; // Used Reference // Not copy
v[0] = 200;
cout<<v1[0]; // 200

vector <pair<int,int>> vp = {{1,2},{3,4},{5,6}};
fo(i,3) cout<<vp[i].first<<" "<<vp[i].second<<endl;

vector<vector<int>> vec(n, vector<int> (m, 0));
```

Set

```cpp
// Stores in sorted order
set <string> st;
s.insert("A") // Initializing
auto it = s.find("A") // Returns an iterator
if(it!=s.end()) s.erase(it); // Erase takes an iterator
s.erase("A");

// unordered_set
// Not sorted
unordered_set <int> st;
st.insert(100); // O(1)
auto it = st.find(100); // O(1)
```

Map

```cpp
// Map - Sorted acording to key
// Unordered map - Not sorted
// Uses Red–black tree to store data
// Map is vector of pairs

map <int, string> mis;
mis[3] = "a"; // O(log(n)) // Insertion method 1
mis.insert({2,"b"}); // Insertion method 2
for(auto it:mis) cout<<it.first<<" "<<it.second<<endl;

auto it = mis.find(3); // O(log(n))
if(it == mis.end()) cout<<"Not available";
else cout<<(*it).second;

map <string,string> mss;
mss["abc"] = "abc" // O(s.size()*log(n))

// Unordered Map - Not Sorted
// Uses hash table
// Any that can be compared, can be used in map
// Pair can't be used in unordered_map
unordered_map <int,int> mp;
mp[3] = 3;
mp.insert({1,1});
mp[2] = 2;
for(auto x:mp){
    cout<<x.first<<" "<<x.second<<endl;
}
cout<<mp[4]<<endl;
//Output
// 2 2
// 1 1
// 3 3
// 0
```

Stack

```cpp
// LIFO - Last in Fast out
// Accessable - Size and Top Element
// Operation - Push, Pop, See

stack <int> stk;
stk.push(1);
while(!stk.empty()){
		cout<<stk.top()<<endl;
		stk.pop();
}
```

Queue

```cpp
// FIFO - First in First out
// Operation - Push, Pop, See
```
MarkText - free minimalistic desktop markdown editor
Tags: markdown, editor, casual
Published: 2022-09-14 09:29:14

After Typora being pay-ware, i stopped to use offline editor (only Obsidian still in use). My requirements was very short:

- Visual styles of markdown text (WYSIWYG)
- Shortcuts for basic word-like operations
- freeware
- not too bloat

And I didn find any software except Typora! 
Now I restart my research and found [MarkText](https://github.com/marktext/marktext)

It is just cool! 


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



Easy. Pretty. No ugly preview, just easy editor box.

Thanks, Luo Ran and contributors!
The difference between stablecoins and other digital assets
Tags: blockchain, rsk, crypto, stablecoins
Published: 2022-09-14 09:22:30

![stablecoin banner](https://i.imgur.com/3aO4ehf.jpg)

In this section, we will cover the difference between a stablecoin and other digital assets like bitcoins, fiat currency, fungible tokens, Central Bank Digital Currency (CBDCs), and Altcoins.

## Stablecoin vs Bitcoins

A stablecoin is a token that has a non-volatile price and Bitcoin is a cryptocurrency whose price is volatile in nature. Stablecoins are used  to minimize the price volatility of cryptocurrencies like Bitcoins.

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

## Stablecoin vs Altcoin

Altcoins are cryptocurrencies other than Bitcoin. Similar comparisons apply, with regards to volatility.

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

## Stablecoin vs Fiat

Stablecoins are issued by crypto companies that are backed by traditional financial investment tools. They can be pegged to any fiat currency, foreign exchange-traded commodities, precious or industrial metals.

While fiat currencies are issued by central banks, they are not asset-backed. Their value depends on the central bank. The central bank can regulate the total supply in circulation by printing and withdrawing them from use.

## Stablecoin vs Fungible Tokens

A stablecoin is a type of fungible token whose value is fixed to another asset, often currencies such as the US dollar or the Euro, and other assets.

Read: [Cryptocurrency vs Token](https://developers.rsk.co/kb/get-crypto-on-rsk/cryptocurrency-vs-token/) or watch the explainer video below:

YouTube: {% youtube GWoNxoaIsbQ %}


<div class="video-container">
  <iframe width="949" height="534" src="https://youtube.com/embed/GWoNxoaIsbQ"   frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>



## Stablecoin vs CBDCs

A stablecoin may or may not be regulated, while Central Bank Digital Currency (CBDC) is completely regulated by the monetary authorities of a nation. This means stablecoins are decentralized while CBDCs are centralized. Furthermore, CBDCs may be implemented with fungible tokens, in a manner similar to stablecoins, or they may be implemented using other technologies, including centralised ones.

![Stablecoin vs CBDCs](https://i.imgur.com/7iPLuIL.png)

## Next

See the Complete Guide to [Stablecoins]( https://developers.rsk.co/guides/stablecoin/) on the RSK Developers Portal. 

Thanks for reading!

----
Get your Jenkins Passwords from secrets
Tags: jenkins, devops, credentials
Published: 2023-08-19 14:37:52

---
title: Get your Jenkins Passwords from secrets
published: true
date: 2022-09-14 09:09:09 UTC
tags: jenkins, devops, credentials
canonical_url: https://whyboobo.com/category/get-jenkins-password-from-secrets/
---

Demo

Check SEO meta: https://metadescriptiontool.com/

First of all, if you have access to your Jenkins server the credentials are stored at:

```
vi /var/lib/jenkins/credentials.xml

```

In order tot get your credentials go to http://YOUR\_IP:8080/script and copy and paste the content below the hit RUN.

```
com.cloudbees.plugins.credentials.SystemCredentialsProvider.getInstance().getCredentials().forEach{
  it.properties.each { prop, val ->
    if (prop == "secretBytes") {
      println(prop + "=>\n" + new String(com.cloudbees.plugins.credentials.SecretBytes.fromString("${val}").getPlainData()) + "\n")
    } else {
      println(prop + ' = "' + val + '"')
    }
  }
  println("-----------------------")
}

```

Source: [https://devops.stackexchange.com/questions/2191/how-to-decrypt-jenkins-passwords-from-credentials-xml/8692#8692?newreg=9197ac19da1b457fb643798bcfa94e05](https://devops.stackexchange.com/questions/2191/how-to-decrypt-jenkins-passwords-from-credentials-xml/8692#8692?newreg=9197ac19da1b457fb643798bcfa94e05)
Wednesday Links - Edition 2022-09-14
Tags: java, jvm, panama, jit
Published: 2022-09-14 08:40:12

Panama: Not-so-Foreign Memory. Using MemorySegment as a high-performance ByteBuffer replacement. (6 min)🧠
https://gavinray97.github.io/blog/panama-not-so-foreign-memory

How to efficiently write millions of records in the cloud and not go bankrupt — an Azure CosmosDB case study (13 min)🌃
https://blog.allegro.tech/2022/09/azure-cosmosdb-case-study.html

Java is Very Fast, If You Don’t Create Many Objects (3 min)🐇
https://blog.vanillajava.blog/2022/09/java-is-very-fast-if-you-dont-create.html

Understanding JIT Optimizations by Decompilation (40 min)🔧
https://www.infoq.com/presentations/jit-optimize-decompile-shopify

JDK 19 and JDK 20: What We Know So Far (6 min)🔮
https://www.infoq.com/news/2022/09/java-19-so-far

Git’s database internals I: packed object store (18 min)📦
https://github.blog/2022-08-29-gits-database-internals-i-packed-object-store/

The Spring Data findAll Anti-Pattern (10 min)🚢
https://vladmihalcea.com/spring-data-findall-anti-pattern/

DSL type-safe builders in Kotlin (16 min)🏗️
https://kt.academy/article/fk-dsl
An overview of the software development process
Tags: productivity, programming, architecture
Published: 2022-09-14 08:39:57


The software development process is a set of activities that takes an idea or concept and turns it into a working piece of software. The steps in the process can vary depending on the project, but they typically include planning, designing, coding, testing, and deploying the software.

One of the most important aspects of the software development process is communication. At each stage of the project, developers need to communicate with stakeholders to ensure that everyone is on the same page. This can be done through meetings, documentation, or other means.

Another key aspect of the software development process is collaboration. Developers often work in teams to complete projects, so it’s important that they are able to work well together. This includes being able to share ideas openly and give constructive feedback to one another.

Finally, developers need to have a strong understanding of how to code and test software before they can deploy it. They also need to be familiar with different tools and technologies that can help them throughout the development process.

## How to achieve better software development with a remote team?

There are a few key things you can do to set your remote team up for success:

**Make sure everyone is on the same page from the start**
Before starting any project, it’s important that everyone is clear on the goals and objectives. This can be done through regular check-ins and updates from the project manager or lead developer.

**Encourage open communication and collaboration**
Remote teams need to be able to communicate openly with one another in order to work effectively together. This includes being able to share ideas and give feedback in a constructive way.

**Use tools and technologies that help with collaboration**
 There are a number of different tools and technologies that can help remote teams collaborate more effectively. These include video conferencing, chat platforms, and project management software.

**Set up regular training and development sessions**
It’s important that developers have a strong understanding of how to code and test software before they can deploy it. They also need to be familiar with different tools and technologies that can help them throughout the development process. Regular training and development sessions can help with this.

Follow me to receive more content like this. 👇
Pitfalls of `process.env` every React developer should know
Tags: react, javascript, webdev
Published: 2022-09-14 08:32:37

## Pitfall #1: It does not exist in the browser

Unlike in Node.js, there is no such thing as `process.env` object in the browser. One neat webpack trick, however, allows us to "emulate" this construct right in our React app. 

Webpack's `DefinePlugin` injects environment variables by token replacement of `process.env.SOME_ENV_VAR`. The final compiled JS will not have any reference to `process.env` because, remember, it does not exist in the browser. So if we have something like this:

```javascript
console.log(process.env.SOME_ENV_VAR);
```

webpack will compile that to something like this:

```javascript
console.log('value of SOME_ENV_VAR');
```

## Pitfall #2: We cannot assign values to it in React code

This one is really just a natural side-effect of pitfall #1. Since `process.env` will not exist in the compiled JS code, it follows that it doesn't make sense to try overriding environment variables inside our React app like this:

```javascript
process.env.REACT_APP_ENV_VAR = 'cannot do this';
```

## Pitfall #3: It may get compiled in a way you didn't expect

There is one significant pitfall that we need to be wary of: **We need to make sure that all environment variables referenced in our source code are defined in our .env files or elsewhere.**

If `DefinePlugin` cannot find a referenced env var's value, it will _not_ token-replace any references with `undefined`. For example, if we have not defined REACT_APP_NOT_FOUND anywhere, but we have this code:

```javascript
console.log(process.env.REACT_APP_NOT_FOUND);
```

will _not_ translate to this:

```javascript
console.log(undefined);
```

Instead, webpack will string-replace just the `process.env` part of the token with the **entire key-value mapping of env vars**. So the translation is actually something like this (even after minification):

```javascript
console.log(
  {
    NODE_ENV: ‘development’,
    REACT_APP_NAME: ‘My App’,
    REACT_APP_ID: ‘232809283923’,
  
    // ... possibly a long list of other values
  }.REACT_APP_NOT_FOUND
);
```
	
Now imagine if we have lots of checks like this throughout our code:

```javascript
if (process.env.REACT_APP_SOME_OPTIONAL_FLAG) { 
  /* . . . */ 
}
```

and we only define env vars in our .env file for flags that are true, thinking it’s fine because the logic above only cares about the _existence_ of the flag, not its value. 

But take the above compiled code containing the entire env vars object literal, and multiply it by who knows how many possibly-undefined env vars... for sure it’s going to hurt our bundle size.

NOTE: The above behavior is based on how `process.env` is _typically_ configured with `DefinePlugin`, such as in Create React App. YMMV.
Monday theme
Published: 2023-09-09 19:03:39

---
title: Monday theme
published: true
date: 2022-09-14 08:22:52 UTC
tags: 
canonical_url: https://themes.gohugo.io/themes/monday-theme/
---

Monday theme Monday theme is a clean and simple theme that is very suitable for blogs. It almost doesn’t use any decoration elements while looking attractive, so visitors will be concentrated on your content and will not be distracted. Screenshots Installation To install the monday theme, clone it into themes directory of your hugo project: git clone https://github.com/cyevgeniy/monday-theme themes/monday-theme Configuration Add theme=monday-theme to your site’s config.toml file, after that Hugo will use the monday theme for building your site.
Top 10 Most Commonly Used AWS Services- Codexashish
Tags: aws, programming
Published: 2022-09-14 08:18:40

In this article, we are going to see the top 10 most used AWS services and if you want to see the Complete Roadmap of AWS for Developers then visit this article. As we know that Amazon Web Services(AWS) is a cloud platform that is one of the most popular, reliable, secured, scalable, and broadly adopted nowadays. There are many AWS Services available but in this article, we will discuss only the top 10 most used AWS services that you must know.

## No.1: Amazon EC2
EC2 stands for Elastic Compute Cloud, if you don't want to invest in costly physical services then Amazon EC2 will help you to manage server features such as ports, security, and storage which are used to create virtual machines in the AWS Cloud. EC2 can be used as a server for hosting websites and other server management features such as storage, security, ports, etc. With the help of EC2, you can create servers in minutes with your preferred operating system.

## No.2: Amazon S3
Amazone S3 stands for Simple Storage Service which offers highly secure and redundant file storage services It also stores data in three data centers within a specific region that's why AWS S3 is one of the most used services of AWS. Amazone S3 also offers integrations to help prevent data breaches(PCI-DSS, HIPAA / HITECH, FedRAMP). It has high availability, so accessing your information is just a click away, with almost zero latency.

## No.3: Amazon RDS
Amazon RDS stands for Relational Database Service which is used to create dedicated database instances. Amazon RDS makes designing infrastructure more user-friendly and it can support multiple database engines like SQL, Amazon Aurora, PostgreSQL, MySQL, MariaDB, and Oracle.

## Discover More
[How to Become DevOps Engineer in 2023?](https://www.codexashish.com/2022/08/devops-learning-roadmap-for-beginners.html)
[DevOps vs MLOps vs AIOps](https://www.codexashish.com/2022/08/difference-between-devops-mlops-and-aiops.html)
[Data Science Roadmap 2023](https://www.codexashish.com/2022/09/how-to-become-data-scientist-roadmap.html)
[How to Become Data Analytics?](https://www.codexashish.com/2022/07/complete-roadmap-to-becoming-a-data-analyst.html)
[AWS Learning Roadmap 2023](https://www.codexashish.com/2022/07/aws-learning-roadmap.html)

## No.4: Amazon CloudFront
CloudFront work as a global Content Delivery Network(CDN) service which helps to improve website speed and access to cloud-based data. Integration with other AWS services makes it efficient and delivers content with minimum latency and because of these features, CloudFront is important.
[Read More>>>](https://www.codexashish.com/2022/09/top-10-most-used-aws-services.html)
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2022-09-14 08:00:27

---
title: "Today's Daily Dose of Programming Humor"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125896e0846.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why was the developer unhappy at their job?

___A:___ They wanted arrays.
 -->
Bitwise Cheat Sheet (C++)
Tags: beginners, cpp, computerscience, programming
Published: 2022-09-14 07:35:52

Operators

```cpp
&      (and)     - (1&0)  = 0       // 0 when one of them 0
|       (or)     - (1|0)  = 1       // 0 when both 0
^      (xor)     - (1^0)  = 1       // 0 when both same
<< (left shift)  - (1<<n) = 2^n     // Multiply by 2
>> (Right shift) - (1>>n) = 1/(2^n) // divided by 2 
```

Basics of Bit

```cpp
// 32 bit - 2^32-1 Numbers
// a 1 2 3 4 5 6 b - a:Most significant bit, b:Least significant bit
// Set bit - 1
// Unset bit - 0

//     10011101
//   & 00010000   1 << 4
//  -------------------
//     00010000
```

Toggle bits

```cpp
void printBinary(int n){
    for(int i=9;i>=0;i--){
        cout<<((n>>i)&1);
    }
    cout<<endl;
}
void solve(){
    int a = 9;
    printBinary(a);
    int i = 3;
    if((a&(1<<i))!=0){
        cout<<"Set bit"<<endl;
        printBinary((a&(~(1<<i))));
        printBinary((a^(1<<i)));
    }else{
        cout<<"Unset bit"<<endl;
        printBinary((a|(1<<i)));
    }
}
```

Set bit counter

```cpp
int cnt = 0;
for(int i=20;i>=0;--i){
    cnt+=((a>>i)&1);
}
cout<<cnt;
cout<<__builtin_popcount(a)<<endl;
cout<<__builtin_popcountl((1LL<<50)-1)<<endl;
```

Remove LSB’s

```cpp
printBinary((a&(~((1<<(i+1))-1))));

//    1101011001
//  & 1111100000 - 0000011111 - 0000100000 - 1<<5
// ---------------
//    1101000000
```

Remove MSB’s

```cpp
printBinary((a&(((1<<(i+1))-1))));

//    1101011001
//  & 0000011111 - 0000100000 - 1<<5
// ---------------
//    0000011001
```

Power of two

```cpp
//   000100000 - Power of two
// & 000011111 - Power fo two-1
// -------------
//   000000000

if(n&(n-1)) cout<<"Not power of two.";
else cout<<"Power of two";
```

XOR Basics

```cpp
// 0^0 = 0
// 0^1 = 1
// 1^0 = 1
// 1^1 = 0
// x^x = 0
// x^0 = x
```

Swap

```cpp
a = a ^ b;
b = a ^ b;
a = a ^ b;
```
Devfolio Polygon Fellowship
Published: 2022-09-14 07:08:37

My journey with the polygon fellowship started with the idea of decentralizing DAO tools.
When I got selected I was pretty excited for the mentorship.

But I hardly got any mentorship and the devfolio team were not helpful at all.

I unfortunately did not take part in the hackerhouse, but definitely the devfolio team did an amazing job hosting it.

At the end of the fellowship had to pivot a little but gave the demo and I am glad it's over.
This fellowship only helped me being motivated to work on my idea but apart from that it was not really a good experience, I received literally zero mentorship which I was most looking forward to.

Hope the devfolio team can organize it better for the future batches.