teleren/devto huggingface dataset:
How to increase swap space in Ubuntu?
Tags: ubuntu, swap
Published: 2021-11-29 07:17:48

---
title: How to increase swap space in Ubuntu?
published: true
date: 2021-11-24 17:36:46 UTC
tags: Ubuntu,swap
canonical_url: https://stackallflow.com/ubuntu/how-to-increase-swap-space-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">swap</span></p>
</header>

I have, by default, 250MB of swap space in Ubuntu, and I want to expand it to a larger size. I need 800MB, which I think will be enough to open several applications without having to hit the current limit of swap. I hope someone can help me.

#### Accepted Answer

**You can always create a swap file** to add more swap space. This is not the same in every aspect as swap partition, but it will be easy and dynamic.

In the following steps, change `/media/fasthdd/swapfile.img` to anything you like. For example, it can be `/swap.img` as well. `/media/fasthdd/swapfile.img` is just an example filename. If you are using this one, then of course there must be a directory `/media/fasthdd/` with enough free space for your new swap file.

Use any terminal application to run the commands of the following steps. All commands should be run _ **with root privileges** _. To do this, you can either add `sudo` to the beginning of every command or run `sudo bash` before running the commands.

1. **Create an empty file** :

This file will contain virtual memory contents so make file big enough for your needs. This one will create a 1GiB file, which means +1GiB swap space for your system:

```
dd if=/dev/zero of=/media/fasthdd/swapfile.img bs=1024 count=1M

```

If you want to make a 3GiB file, then change count value to `count=3M`. See `man dd` for more information.

2. **Bake the swap file** :

The following command is going to make a “swap filesystem” inside your fresh swap file.

```
mkswap /media/fasthdd/swapfile.img

```
3. **Bring up on boot** :

To make sure that your new swap space is activated while booting up computer, you should add it to the filesystem configuration file `/etc/fstab`. Add it to the end of the file. This is recommended because other filesystems (_at least one that contains a swap file_) must be mounted in read-write mode before we can access any files.

```
# Add this line to /etc/fstab
/media/fasthdd/swapfile.img swap swap sw 0 0

```
4. **Activate** :

You can either reboot your computer or activate the new swap file by hand with the following command:

```
swapon /media/fasthdd/swapfile.img

```

* * *

**If everything goes well** , you should see that more swap space is available for use. You can use the following commands to check your new swap and confirm that it is active:

```
$ cat /proc/swaps
Filename Type Size Used Priority
/media/fasthdd/swapfile.img file 8388604 2724 -1

$ grep 'Swap' /proc/meminfo
SwapCached: 4772 kB
SwapTotal: 8388604 kB
SwapFree: 8355812 kB

```

The post [How to increase swap space in Ubuntu?](https://stackallflow.com/ubuntu/how-to-increase-swap-space-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
Dependency Confusion - How can you hack Apple, Microsoft and dozens of other companies?
Tags: security, programming
Published: 2021-11-24 16:40:09

{% youtube rKEUN_S6fVA %}

---

A security researcher and his team have successfully deployed malware within the source code of companies known to be at the top of computer security, such as Apple, Microsoft, Paypal or Shopify.


Indeed, not really amateurs in terms of know-how to develop software in a secure way.


Well despite this, this researcher has managed to go through all the defenses of his companies simply by going through the development libraries that all developers use so as not to have to constantly reinvent the wheel.

By injecting malware into these libraries, he only had to wait for an update within these companies to be deployed without doing anything.
Unstoppable.

We talk about it in this video and I explain how to avoid falling into the trap yourself.

And you, have you ever thought about this kind of attack method on your software?


---

*If you like this content, push the like button, that helps spread the message.* 👍🏼
*If you think it can be useful to anyone in your network, share it.* 📨

---

Video produced by [Wild & Secure](https://wildnsecure.com), your consulting firm to all things security and real estate.
If you want to receive weekly quality content about security, subscribe to our newsletter on our website.
Ubuntu GNOME 17.04: wi-fi not working — mac address keeps changing!
Tags: ubuntu, 1704networkmanagerne
Published: 2021-11-29 07:16:51

---
title: Ubuntu GNOME 17.04: wi-fi not working — mac address keeps changing!
published: true
date: 2021-11-24 17:34:55 UTC
tags: Ubuntu,1704networkmanagerne
canonical_url: https://stackallflow.com/ubuntu/ubuntu-gnome-17-04-wi-fi-not-working-mac-address-keeps-changing/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">17.04</span><span style="font-size: 1.2em; color: initial;">network-manager</span><span style="font-size: 1.2em; color: initial;">networking</span><span style="font-size: 1.2em; color: initial;">wireless</span></p>
</header>

My Panda USB wi-fi adapter works just fine on 16.10, but when I try to connect to my wi-fi router in 17.04, GNOME network manager reports “Connection failed.” I did some tinkering, and noticed that my MAC address for my wifi adapter, according to GNOME, is DIFFERENT every time I make it forget my wifi settings and try to reconnect. Any leads on a possible fix or work-around?

I’m running Ubuntu GNOME 17.04, kernel 4.10.0-19-generic, GNOME 3.24.0.

#### Accepted Answer

So [Jesse](https://askubuntu.com/users/75252/jesse) discovered a solution and I’m going to share it here in answer form as clearly as I can muster. This fixed wifi for me using a Panda Wireless USB wifi adapter on Ubuntu 17.04:

For [privacy reasons](https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/), the default settings for Ubuntu 17.04’s network manager (ALL flavours, not just GNOME) cause the MAC address of the Wifi device to change constantly. To fix this, you just have to create a new config file as outlined below and then restart the network-manager service.

Open a terminal and run:

```
sudo tee /etc/NetworkManager/conf.d/wifi.scan-rand-mac-address.conf > /dev/null <<EOF
[device]
wifi.scan-rand-mac-address=no
EOF
sudo service network-manager restart

```

and wifi should work again! (unless something else is wrong).

This fix should work even on a live CD/USB session.

The post [Ubuntu GNOME 17.04: wi-fi not working — mac address keeps changing!](https://stackallflow.com/ubuntu/ubuntu-gnome-17-04-wi-fi-not-working-mac-address-keeps-changing/) appeared first on [Stack All Flow](https://stackallflow.com).
How to fix ‘modprobe vboxdrv’ error in virtualBox?
Tags: ubuntu
Published: 2021-11-29 07:16:08

---
title: How to fix ‘modprobe vboxdrv’ error in virtualBox?
published: true
date: 2021-11-24 17:34:04 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/how-to-fix-modprobe-vboxdrv-error-in-virtualbox/
---

I install `virtualBox` on Ubuntu 16.04, but after install and create new virtual Host shows this error:

> Kernel driver not installed (rc=-1908)
> 
> The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please install virtualbox-dkms package and load the kernel module by executing
> 
> ```
> modprobe vboxdrv
> 
> ```
> 
> as root. If it is available in your distribution, you should install the  
> DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
> 
> ```
> where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. 
> 
> ```

How to address this `modprobe vboxdrv` error?

#### Accepted Answer

As the first step run this command:

```
sudo modprobe vboxdrv

```

If it’s not helpful run these commands:

```
sudo apt update
sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

```

Then **reboot** your system and after reboot run this command:

```
sudo modprobe vboxdrv

```

And if it doesn’t work you must **disable Secure Boot** in your BIOS/UEFI settings because Secure Boot prevents unsigned modules from being loaded.

The post [How to fix ‘modprobe vboxdrv’ error in virtualBox?](https://stackallflow.com/ubuntu/how-to-fix-modprobe-vboxdrv-error-in-virtualbox/) appeared first on [Stack All Flow](https://stackallflow.com).
Virtualbox Kernel driver not installed in Ubuntu?
Tags: ubuntu, kernelvirtualbox
Published: 2021-11-29 07:14:05

---
title: Virtualbox Kernel driver not installed in Ubuntu?
published: true
date: 2021-11-24 17:27:53 UTC
tags: Ubuntu,kernelvirtualbox
canonical_url: https://stackallflow.com/ubuntu/virtualbox-kernel-driver-not-installed-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">kernel</span><span style="font-size: 1.2em; color: initial;">virtualbox</span></p>
</header>

<aside role="status">
<div>
<div>
<div>
<div>
<b>This question already has answers here</b>:</div>
</div>
</div>
<div>
<a dir="ltr" href="https://stackallflow.com/ubuntu/how-to-fix-modprobe-vboxdrv-error-in-virtualbox/" data-wpel-link="internal">How to fix ‘modprobe vboxdrv’ error in virtualBox?</a><br>
<span><br>
(3 answers)<br>
</span>
</div>
<div>Closed <span title="2019-01-05 10:56:04Z">2 years ago</span>.</div>
</div>
</aside>

I tried to use my Virtual Box and this is the error I received – (I just updated to the new Ubuntu also) and I am VERY new at this Linux OS.

> Kernel driver not installed (rc=-1908)
> 
> The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or  
> there is a permission problem with /dev/vboxdrv. Please reinstall the  
> kernel module by executing
> 
> ‘/etc/init.d/vboxdrv setup’
> 
> as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS  
> package first. This package keeps track of Linux kernel changes and  
> recompiles the vboxdrv kernel module if necessary.

![Virtualbox Kernel driver not installed](https://i.stack.imgur.com/6nMRu.png)

#### Accepted Answer

Re-install `virtualbox-dkms` package first

```
sudo apt-get autoremove virtualbox-dkms
sudo apt-get install build-essential linux-headers-`uname -r` dkms virtualbox-dkms

```

After that You can enable it manually

```
sudo modprobe vboxdrv
sudo modprobe vboxnetflt

```

The post [Virtualbox Kernel driver not installed in Ubuntu?](https://stackallflow.com/ubuntu/virtualbox-kernel-driver-not-installed-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
More Willpower to Developers
Tags: actionshackathon21, javascript, github, beginners
Published: 2021-11-24 17:18:35

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon 2021, please fill out all sections.)


### My Workflow
[Note]: # (Please make sure the project links to the appropriate GitHub Actions repository, and includes [an open source license](https://choosealicense.com/) and README.)
**Scenario**: You're a developer, scouring the open source ocean of github, making contributions, raising issues, reading comments in the issue, contributing back, raising PRs and sometimes, the end result is just too far away for the journey to be satisfying enough to keep going. Wouldn't a pick-me-up go a long way ?

**Enter** `uplifiting-quote-action`. Any comment you make on a PR or issue and you are met with an uplifting quote. The right words at the right time can do wonders to help recharge your willpower and help you get back on track with renewed vigor and energy.

Behind this action is but one purpose, to kindle the developer's mind to action whenever he/she experiences a sense of declining enthusiasm.


### Submission Category: 
Wacky Wildcards :stuck_out_tongue_closed_eyes:
[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


### Yaml File or Link to Code
{% github https://github.com/Infinity-Intellect/uplifiting-quote-action %}
[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% https://github.com/Infinity-Intellect/uplifiting-quote-action %}` to share a GitHub repository)


### Additional Resources / Info
[Javscript Github Actions Documentation](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action) (Very beginner-friendly!)

As a Github actions newbie, I only regret not getting into this sooner. I can't wait to create more actions that will aid in the developer workflow.
05 AKS - Build, Containerize, Run and Expose Node.js Application
Tags: azure, aks, kubernetes, devops
Published: 2021-11-24 17:11:34

Create a simple Node.js Express.js application, containerize it then push it to ACR and finally deploy in Kubernetes and use as Public Website. Inspired from https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

https://youtu.be/yhyTK0k-WkY

{% youtube yhyTK0k-WkY %}
Las aplicaciones de música
Tags: música, spotify, apps, android
Published: 2021-11-24 16:58:24

Dentro del mundo de la música existen muchas aplicaciones que nos dan acceso a millones de canciones. Dentro de la lista de aplicaciones más utilizadas para escuchar música encontramos a <a href="https://www.noticieroandroid.com/aplicaciones/spotify-premium-apk/">Spotify</a>, Deezer, YouTube Music, etc.
Conforme la música crece las aplicaciones avanzan a un ritmo similar, cada vez encontramos más herramientas que podemos utilizar para escuchar música.
Slow Start-Up Time
Tags: reactnative, android, javascript, mobile
Published: 2021-11-24 11:48:26

My app is taking too much to open approximately (7–12 secs).
In development mode, I observed a gap(15 secs) in the node server between bundling and the first console.log() of the "index.js" file(very first file).
I have enabled Hermes
I have started using inline require
I have removed unused files and unused reports

Can you guys please help me with this, this is very urgent(I am stuck in this for the last 1–2 weeks).
Please refer to the image to see the gap. (//TRE is the first console.log in the "index.js" file.)
(https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cw0p1vd0qn00vu4dzgek.png)



//This is my package.json
  "dependencies": {
    "@babel/runtime": "^7.15.4",
    "@react-native-async-storage/async-storage": "^1.15.4",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/drawer": "^5.9.0",
    "@react-navigation/native": "5.1.4",
    "@react-navigation/stack": "5.2.9",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^0.19.2",
    "moment": "^2.29.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.3",
    "react-native-bcrypt": "^2.4.0",
    "react-native-calendar-picker": "^7.0.3",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^8.1.3",
    "react-native-elements": "^3.4.1",
    "react-native-gesture-handler": "~1.7.0",
    "react-native-keychain": "^7.0.0",
    "react-native-material-ui": "^1.30.1",
    "react-native-modal": "^12.0.2",
    "react-native-modal-dropdown": "^1.0.1",
    "react-native-reanimated": "~1.13.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "~2.10.1",
    "react-native-selectmultiple-button": "^0.1.105",
    "react-native-splash-screen": "^3.2.0",
    "react-native-sqlite-storage": "^5.0.0",
    "react-native-svg": "^12.1.1",
    "react-native-unimodules": "~0.11.0",
    "react-native-vector-icons": "6.6.0",
    "react-native-webview": "^11.6.5",
    "react-navigation": "^4.4.4",
    "react-redux": "7.1.3",
    "redux": "4.0.5",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "rn-fetch-blob": "^0.12.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-jest": "~25.2.6",
    "jest": "~25.2.6",
    "metro-react-native-babel-preset": "^0.58.0",
    "react-devtools": "^4.13.5",
    "react-native-svg-transformer": "^0.14.3",
    "react-test-renderer": "~16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
1 line of code: How to sort an array by ascending order
Tags: javascript, webdev, performance, codequality
Published: 2021-11-24 16:43:53


```javascript
const sortAsc = arr => [...arr].sort((a, b) => a - b);
```
Returns a new array sorted by ascending (Numbers). 
Beware of JavaScript's Automatic Type Conversion if your `Array` contains something else than `Numbers`.
 

---

## The repository & npm package

You can find the all the utility functions from this series at [github.com/martinkr/onelinecode](https://github.com/martinkr/onelinecode)
The library is also published to [npm as @onelinecode](https://www.npmjs.com/package/@onelinecode/onelinecode) for your convenience.

The code and the npm package will be updated every time I publish a new article.

---
Follow me on [Twitter: @martinkr](http://twitter.com/_martinkr) and consider to [buy me a coffee](https://www.buymeacoffee.com/martinkr)

Photo by [zoo_monkey](https://unsplash.com/@zoo_monkey) on [Unsplash](https://unsplash.com/s/photos/fuji)

---
Import Excel file data to HTML table using jquery
Tags: javascript, html, webdev, tutorial
Published: 2021-11-24 16:40:36

I found many tutorial to export html table data to excel, But in this post you will learn how to  import Excel file data to HTML table using jquery.

{% codepen https://codepen.io/hafeez-pp/pen/XWjRqex %}


Thank You 💙
What lies in the .git folder? How are commits stored? Answered by Microsoft MVP & author of SQL Source Control!
Tags: programming, opensource, github, beginners
Published: 2021-11-24 16:38:49

**The definitive deep dive into the .git folder** by Rob Richardson, author of SQL Server Source Control Basics, a Microsoft MVP, and a frequent Speaker.

**Git** *--everything-is-local!*
From writing code, to branching-creating PRs to merging. For our everyday collaborative development tasks. Git has become an essential tool, surpassing other SCM tools. Being lightweight with fast performance, git has a lot of features. And with every every locat git repository there comes a .git folder. Where all the essential data is stored about the ongoing project! 


We've all been using Github and are very familiar with the .git folder. **But how things operate inside it? What's in the .git folder? How are commits stored?** How do branches work? We'll dive deep into the objects folder, unpack commits, look at the types of DAG nodes, examine object content, and build a complete visualization of the stored content. We'll also quickly look through Git hooks, Git config, and ref logs. Come experience the zen of git at [Git Commit Show.](https://gitcommit.show/)

🌟Join our Discord Server for an amazing QnA [here](https://discord.gg/JFWP8c2gPG).

✨ Get your tickets to the event [here](http://push.gitcommit.show/).

⏲Check the schedule [here](https://gitcommit.show/schedule/index.html).

About **Rob Richardson**:
- He is a software craftsman building web properties in ASP.NET and Node, React and Vue JS. 
- A Microsoft MVP, published author, frequent speaker at conferences, user groups, and community events. A diligent teacher and student of high quality software development.
- He often speaks at various conferences and Loves to talk and share his knowledge on Open Source 💚!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wlh4gol2eje8r8iy4bu.png)
CrowdSource Vocalize Campaign (Earn Free Goodies)
Tags: javascript, tutorial, react, webdev
Published: 2021-11-24 16:36:01

###What Is CrowdSource?
Crowdsource is an android app from Google used for training various machine learning models through individual contributions. Individuals can signup and help train various machine learning models including speech recognition, text recognition and many more and stand a chance to win many amazing prizes.

###Vocalize Campaign
The Vocalize Campaign is an initiative created by the Google Speech team to include selected languages into their dataset through the new **Audio Donation** task on the **Crowdsource** App.

###Who Can Participate In The Campaign
* Android Users (since Crowdsource app is only on android phones)
* Anyone who speaks the following languages - 
[Africa] Akan, Hausa, Igbo, Kinyarwanda, Sesotho, Shona, Somali, Wolof, Yoruba.
[India] Assamese, Gujarati, Hindi, Kannada, Malayalam, Odia, Tamil, Telugu.
* Anyone who is at least 18 years of age

###How To Participate
* Download the **CrowdSource** App on PlayStore
* Sign up with your email address
* Now, Sign up for the campaign by filling this form - [Vocalize Campaign](https://docs.google.com/forms/d/e/1FAIpQLSfv5zQrQDL3Srw8wsNU30TTUVESEIYkaTjS2qZGD_Eh7NIpHw/viewform?usp=pp_url&entry.1076702745=Seth_Addo)

>You will be asked to select your language(s) and a preferred team color. Depending on the color that you select, you will become a part of the four teams: **Green** (fyi, this is my team), Blue, Red and Yellow (You will be grouped with other participants across the two regions that made the same selection as you) - After a fun and friendly competition of contributing to the audio donation task, one group will emerge as the winner!

* Contribute to the **Audio Donation** task on the **CrowdSource** app across a period of two months(Nov 15, 2021 to Jan 14, 2022); participate in campaign meetups and other activities.

###Special Surprise!
Members of the top contributing group(out of the four cross-regional teams) and individual top contributors within each language will receive a curation of exciting goodies!.

Thanks For Reading and don't forget to follow me for more exciting opportunities like this one
LaTeX & Macros: Math in Macros
Tags: codenewbie, latex
Published: 2021-11-24 15:54:02

Hello, how are you? :) 

In this post you I tell you 
- How to put or declare math in a macro 

## Introduction 
We have checked two types of macros 

1. Macros without arguments
2. Macros with arguments

And, we have seen that they help us to avoid repeating the same structure many times, but with normal text, not with math. 


## Math in macros 

Today we will meet the instruction 

```LaTeX
\ensuremath{myEquation}
```

This command allow us to define macros with math which works in text and math modes, the general structure is 

```LaTeX
\newcommand{\name}{\ensuremath{myEquation}}
```
So, you could had thought, *I just put the instructions between `$` and it is all* but no, because if you do that in the macros, in the normal text you need to put the math between `$` too, and it is not correct

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

Here I declared the macro with math using our new instruction, it produces 

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

Did you notice, with `ensuremath` you can use your command either between `$` or without them

> The recommendation is to use the math inside the `$` symbols or `\[\]` as we have seen, to have an order and know when something is about math and when it is not related with math 

[Here](https://texlive.net/run?%5Cdocumentclass%7Barticle%7D%0A%0A%25Declare%20the%20macros%20here,%20do%20not%20forget%20the%20structure%0A%0A%5Cnewcommand%7B%5CFirstExample%7D%5B1%5D%7B%5Censuremath%7B%7Bx%7D%5E%7B%231%7D%7D%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0AThis%20is%20a%20quadratic%20equation%20$%5CFirstExample%7B2%7D$%0A%0A%5Cend%7Bdocument%7D) is an example where you can play. 

What happens if you do not use `ensuremath` and want to use a math expression without using `$`? 

This is all for today

Do not forget to follow me on Twitter `@latexteada`

Greetings :)