Could WebAssembly and WebGPU be the next hope of the Linux desktop ?
I recently learned about WebAssembly (WASM) which is a new standard that allows developers to compile pretty much any language (like C++, Rust, C#...) to a portable virtual machine that can be run in any modern browser with near-native performance while being sandboxed. To be fair I'm pretty hyped by this technology and I'd like to share my reflection about what that could implies for software development as a whole and how that could help the Linux desktop.
Firstly, the only real problem with Linux today is software availability, it is literally the only problem that cannot be reasonably addressed by its users, we probably all know some people who tried Linux and even tho they enjoyed it, they need to use some kind of Windows-only software, however they would happily make the switch if only they could run all their software and games on it.
However, recently thanks to technology like Electron, this problem started to see some answers : cross-platforms frameworks that allow to "Write once, run everywhere" are probably the only reasonable solution. Electron allow developers to take any web application and ship it as a desktop application (Discord is written in Electron for example), even tho I perfectly understand the hate towards Electron for a variety of reasons, I still think it is a wonderful technology that helped Linux : some companies who previously would not have care about shipping a Linux build can now do it simply by editing a single compilation flag without any further modification to their code.
So, even if Electron is very useful, there are still some major limitations : most notably it is still just a Chrome tab running JavaScript, for light applications it is not a problem, but if the app needs near-native performance or direct access to the GPU, Electron is out of luck. However this may no longer be true very soon thanks to WASM and a new standard which is right now under active development : WebGPU which will allow web applications that need heavy graphics workload to operate like native applications.
In a few years, I can see a future where any application could run in a web browser, we may for example use Photoshop right into the browser or play any game directly in the browser as the gap between real native performance and WASM will tend to zero. The best part is that thanks to technologies like the Emnoscripten compiler, C++ code can directly be ported into WASM, not requiring developers to make massive changes to their codebase, making it directly executable in a browser or in Electron. Stuff like "Universal binaries" already exist by taking advantage of the WASM format (the Wasmer runtime for example).
Essentially operating systems may just become a bootloader for these universal platforms, once this happen for real, Windows may lose its biggest advantage, in fact Microsoft will probably fight against it but it's not clear how they could win in the long run, once we'll be there, the Linux desktop will finally become a fully viable alternative.
So, what do you think is going to happen ? Is WASM just another technology that will remain marginal or the start of something great ? Could the Linux desktop rise because of that ? It this reflection realistic ?
https://redd.it/ldlese
@r_linux
I recently learned about WebAssembly (WASM) which is a new standard that allows developers to compile pretty much any language (like C++, Rust, C#...) to a portable virtual machine that can be run in any modern browser with near-native performance while being sandboxed. To be fair I'm pretty hyped by this technology and I'd like to share my reflection about what that could implies for software development as a whole and how that could help the Linux desktop.
Firstly, the only real problem with Linux today is software availability, it is literally the only problem that cannot be reasonably addressed by its users, we probably all know some people who tried Linux and even tho they enjoyed it, they need to use some kind of Windows-only software, however they would happily make the switch if only they could run all their software and games on it.
However, recently thanks to technology like Electron, this problem started to see some answers : cross-platforms frameworks that allow to "Write once, run everywhere" are probably the only reasonable solution. Electron allow developers to take any web application and ship it as a desktop application (Discord is written in Electron for example), even tho I perfectly understand the hate towards Electron for a variety of reasons, I still think it is a wonderful technology that helped Linux : some companies who previously would not have care about shipping a Linux build can now do it simply by editing a single compilation flag without any further modification to their code.
So, even if Electron is very useful, there are still some major limitations : most notably it is still just a Chrome tab running JavaScript, for light applications it is not a problem, but if the app needs near-native performance or direct access to the GPU, Electron is out of luck. However this may no longer be true very soon thanks to WASM and a new standard which is right now under active development : WebGPU which will allow web applications that need heavy graphics workload to operate like native applications.
In a few years, I can see a future where any application could run in a web browser, we may for example use Photoshop right into the browser or play any game directly in the browser as the gap between real native performance and WASM will tend to zero. The best part is that thanks to technologies like the Emnoscripten compiler, C++ code can directly be ported into WASM, not requiring developers to make massive changes to their codebase, making it directly executable in a browser or in Electron. Stuff like "Universal binaries" already exist by taking advantage of the WASM format (the Wasmer runtime for example).
Essentially operating systems may just become a bootloader for these universal platforms, once this happen for real, Windows may lose its biggest advantage, in fact Microsoft will probably fight against it but it's not clear how they could win in the long run, once we'll be there, the Linux desktop will finally become a fully viable alternative.
So, what do you think is going to happen ? Is WASM just another technology that will remain marginal or the start of something great ? Could the Linux desktop rise because of that ? It this reflection realistic ?
https://redd.it/ldlese
@r_linux
reddit
Could WebAssembly and WebGPU be the next hope of the Linux desktop ?
I recently learned about WebAssembly (WASM) which is a new standard that allows developers to compile pretty much any language (like C++, Rust,...
Rocky Linux: Build Infrastructure Update
Infrastructure ready for build systems and automatic package builds has been passed to the Development team on schedule. They’re now performing validation steps as they continue to work on the core OS. You can view initial successful builds on Koji.
​
Want to get involved? Join our Mattermost server and check out /r/RockyLinux
https://redd.it/ldk763
@r_linux
Infrastructure ready for build systems and automatic package builds has been passed to the Development team on schedule. They’re now performing validation steps as they continue to work on the core OS. You can view initial successful builds on Koji.
​
Want to get involved? Join our Mattermost server and check out /r/RockyLinux
https://redd.it/ldk763
@r_linux
How to begin making a linux application
I really hate the look of all the linux music players I've used, and would like to attempt to make my own, where would I begin, I have basic knowledge of python and am learning more now, but don't know what tools to use to create a full application with gui.
https://redd.it/ldnv2r
@r_linux
I really hate the look of all the linux music players I've used, and would like to attempt to make my own, where would I begin, I have basic knowledge of python and am learning more now, but don't know what tools to use to create a full application with gui.
https://redd.it/ldnv2r
@r_linux
reddit
How to begin making a linux application
I really hate the look of all the linux music players I've used, and would like to attempt to make my own, where would I begin, I have basic...
Share the Internet automatically from iPhone to Linux
If you want to share internet wirelessly from iPhone without even enabling hotspot than you can configure Bluetooth tethering by pairing them together.
This is how you can connect and share your internet form iPhone to your Linux, using gnome Network Manager
1. Pair your iPhone with Linux in Bluetooth Settings.
2. Now in Settings > Network you can see a new option " Connect to Internet". Click it and your internet will be connected.
To connect it automatically,
3) Open Terminal, Enter the command (Install nmcli if not installed)
nmcli device
Now you will see a list of devices. Get the address of your iPhone device from there, it looks like "2C:33:61:6C:21:F9"
4) Now disable internet if connected and try this command:
nmcli device connect ADDRESS
Example: nmcli device connect 2C:33:61:6C:21:F9
If the internet is connected than its working.
5) You can create a shortcut key for this command in Settings> Keyboard Shortcut
To connect the internet automatically after logging in:
6) Open file .profile from Home/.profile and paste the above used terminal command in the end
Now, Your Linux will automatically take the internet from the iPhone after login. Your iPhone doesn't need to do anything except that the mobile data and Bluetooth is turned ON.
https://redd.it/ldp6nl
@r_linux
If you want to share internet wirelessly from iPhone without even enabling hotspot than you can configure Bluetooth tethering by pairing them together.
This is how you can connect and share your internet form iPhone to your Linux, using gnome Network Manager
1. Pair your iPhone with Linux in Bluetooth Settings.
2. Now in Settings > Network you can see a new option " Connect to Internet". Click it and your internet will be connected.
To connect it automatically,
3) Open Terminal, Enter the command (Install nmcli if not installed)
nmcli device
Now you will see a list of devices. Get the address of your iPhone device from there, it looks like "2C:33:61:6C:21:F9"
4) Now disable internet if connected and try this command:
nmcli device connect ADDRESS
Example: nmcli device connect 2C:33:61:6C:21:F9
If the internet is connected than its working.
5) You can create a shortcut key for this command in Settings> Keyboard Shortcut
To connect the internet automatically after logging in:
6) Open file .profile from Home/.profile and paste the above used terminal command in the end
Now, Your Linux will automatically take the internet from the iPhone after login. Your iPhone doesn't need to do anything except that the mobile data and Bluetooth is turned ON.
https://redd.it/ldp6nl
@r_linux
reddit
Share the Internet automatically from iPhone to Linux
**If you want to share internet wirelessly from iPhone without even enabling hotspot than you can configure Bluetooth tethering by pairing them...
How to make a bootable for windows?
I was deleting ubuntu but somehow my windows bootloader got damaged or something. So windows is not loading . Now I am on manjaro and downloaded a windows iso but etcher say that iso image is not bootable .I tried several other methods from google or youtube but nothings works. I mostly use linux but windows is required for some tasks. And data is important too. How can i make a bootable usb from linux.
https://redd.it/ldqmm4
@r_linux
I was deleting ubuntu but somehow my windows bootloader got damaged or something. So windows is not loading . Now I am on manjaro and downloaded a windows iso but etcher say that iso image is not bootable .I tried several other methods from google or youtube but nothings works. I mostly use linux but windows is required for some tasks. And data is important too. How can i make a bootable usb from linux.
https://redd.it/ldqmm4
@r_linux
reddit
How to make a bootable for windows?
I was deleting ubuntu but somehow my windows bootloader got damaged or something. So windows is not loading . Now I am on manjaro and downloaded a...
ExpidusOS: mobile and desktop Void Linux with XFCE 4
Hello, I'm developing the Expidus operating system along with a few people I know. We've spent the last 5 months working on getting this system to the point its at right now and we're almost ready to release
Website which contains a bit more info: http://expidusos.com
GitHub with the source code: https://github.com/ExpidusOS
https://redd.it/ldpucu
@r_linux
Hello, I'm developing the Expidus operating system along with a few people I know. We've spent the last 5 months working on getting this system to the point its at right now and we're almost ready to release
0.1.0-prealpha-test1. This release will be out by the end of February. The OS is based on Void Linux and uses a minimal package repository. The minimal repository is necessary since the OS will run its own app store which we plan on making open source for others to help along with. Talking to people on DanctNIX and the PINE64 Discord servers have spiked an interest in this OS. With their support and others, I hope this operating system will be something worth using once alpha or beta rolls out. And yes, I did get XFCE to work on the PinePhone.Website which contains a bit more info: http://expidusos.com
GitHub with the source code: https://github.com/ExpidusOS
https://redd.it/ldpucu
@r_linux
Linuxfest Northwest 2021 Cancelled
I was notified a little less than two weeks ago, last year was an online thing which did not feel the same.
I got to admit, it feels like it has been in decline over the past few years, but I do respect the work put in to it. I am hoping there will be a rebound next year.
https://redd.it/lds3wo
@r_linux
I was notified a little less than two weeks ago, last year was an online thing which did not feel the same.
I got to admit, it feels like it has been in decline over the past few years, but I do respect the work put in to it. I am hoping there will be a rebound next year.
https://redd.it/lds3wo
@r_linux
reddit
Linuxfest Northwest 2021 Cancelled
I was notified a little less than two weeks ago, last year was an online thing which did not feel the same. I got to admit, it feels like it has...
How to look for Linux admin Freelance projects/one time jobs?
I have a friend who is also has a job as Linux admin, but he also wants to do some freelance work in the Linux field. Like:-Monitoring/Migrating/troubleshooting/Security for Wordpress/CentOS/Ubuntu servers/ LEMP/LAMP etc.
and have experience about 5 years.
The thing is, he tried Upwork already but didn't receive a single job even applied regularly and profile is verified and more over they now charge you for every proposal.
Any underground community or site where he can get these one time jobs/projects ?
https://redd.it/lds2q0
@r_linux
I have a friend who is also has a job as Linux admin, but he also wants to do some freelance work in the Linux field. Like:-Monitoring/Migrating/troubleshooting/Security for Wordpress/CentOS/Ubuntu servers/ LEMP/LAMP etc.
and have experience about 5 years.
The thing is, he tried Upwork already but didn't receive a single job even applied regularly and profile is verified and more over they now charge you for every proposal.
Any underground community or site where he can get these one time jobs/projects ?
https://redd.it/lds2q0
@r_linux
reddit
How to look for Linux admin Freelance projects/one time jobs?
I have a friend who is also has a job as Linux admin, but he also wants to do some freelance work in the Linux field....
I'm teaching Linux Command line fundamentals for free
I teach about command line and linux in general on discord anyone interested can pm me to get the discord link.
Apart from this on the discord I post resources, and you can ask anything related and meet people also interested in computer science in general.
https://redd.it/ldtpw2
@r_linux
I teach about command line and linux in general on discord anyone interested can pm me to get the discord link.
Apart from this on the discord I post resources, and you can ask anything related and meet people also interested in computer science in general.
https://redd.it/ldtpw2
@r_linux
reddit
I'm teaching Linux Command line fundamentals for free
I teach about command line and linux in general on discord anyone interested can pm me to get the discord link. Apart from this on the discord I...
Application for dynamically map network nodes
As i was wondering, is there any free application to dynamically map or visually monitor live nodes on the network like Spiceworks’ Network Mapping tool or Intermapper?
My requirement is that i want to create a live diagram(map) of all the nodes on my network and their live status.
https://redd.it/lds3qi
@r_linux
As i was wondering, is there any free application to dynamically map or visually monitor live nodes on the network like Spiceworks’ Network Mapping tool or Intermapper?
My requirement is that i want to create a live diagram(map) of all the nodes on my network and their live status.
https://redd.it/lds3qi
@r_linux
reddit
Application for dynamically map network nodes
As i was wondering, is there any free application to dynamically map or visually monitor live nodes on the network like Spiceworks’ Network...
Pagemon is an interactive memory/page monitoring tool allowing one to browse the memory map of an active running process.
https://kernel.ubuntu.com/~cking/pagemon/
https://redd.it/ldty6q
@r_linux
https://kernel.ubuntu.com/~cking/pagemon/
https://redd.it/ldty6q
@r_linux
reddit
Pagemon is an interactive memory/page monitoring tool allowing one...
Posted in r/linux by u/mariuz • 9 points and 0 comments
SFTPGo 2.0.0 Released
SFTPGo is a fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support, written in Go. It can serve local filesystem, S3 (compatible) Object Storage, Google Cloud Storage, Azure Blob Storage, other SFTP servers.
Notable changes:
- Data At Rest Encryption.
- KMS support: cloud account credentials and other sensitive data can be stored within external Key Management Services (Vault, GCP KMS, AWS KMS).
- SFTP can also be used as storage backend, so you can proxy other SFTP servers.
- Two-Way TLS authentication, aka TLS with client certificate authentication, for FTP, WebDAV, REST API, web admin.
- Built-in defender: you can configure an auto-blocking policy for offending hosts.
You can find more details here:
https://github.com/drakkan/sftpgo/releases/tag/v2.0.0
https://redd.it/ldw7v4
@r_linux
SFTPGo is a fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support, written in Go. It can serve local filesystem, S3 (compatible) Object Storage, Google Cloud Storage, Azure Blob Storage, other SFTP servers.
Notable changes:
- Data At Rest Encryption.
- KMS support: cloud account credentials and other sensitive data can be stored within external Key Management Services (Vault, GCP KMS, AWS KMS).
- SFTP can also be used as storage backend, so you can proxy other SFTP servers.
- Two-Way TLS authentication, aka TLS with client certificate authentication, for FTP, WebDAV, REST API, web admin.
- Built-in defender: you can configure an auto-blocking policy for offending hosts.
You can find more details here:
https://github.com/drakkan/sftpgo/releases/tag/v2.0.0
https://redd.it/ldw7v4
@r_linux
GitHub
Release v2.0.0 · drakkan/sftpgo
New features:
REST API v2: you can now define administrators and related permissions.
Data At Rest Encryption.
KMS support: cloud account credentials and other sensitive data can be stored within ...
REST API v2: you can now define administrators and related permissions.
Data At Rest Encryption.
KMS support: cloud account credentials and other sensitive data can be stored within ...
Used saved chrome shortcuts as default applications for filetype
Hello,
For quite some time now, most popular browsers allowed their users to save shortcuts to websites as standalone applications - resulting in opening a new window independent to main browser.
I was thinking if it was possible to associate such shortcuts with certain file types and assign it as default application? I tried to tinker with /usr/bin but to no avail.
Any ideas, suggestions? Would anyone like to share their experiences?
I'm running Ubuntu 20.10, said filetype was .xlsx - MS Excel files. I was trying to associate it with Google Docs saved as Chrome application.
https://redd.it/ldwvox
@r_linux
Hello,
For quite some time now, most popular browsers allowed their users to save shortcuts to websites as standalone applications - resulting in opening a new window independent to main browser.
I was thinking if it was possible to associate such shortcuts with certain file types and assign it as default application? I tried to tinker with /usr/bin but to no avail.
Any ideas, suggestions? Would anyone like to share their experiences?
I'm running Ubuntu 20.10, said filetype was .xlsx - MS Excel files. I was trying to associate it with Google Docs saved as Chrome application.
https://redd.it/ldwvox
@r_linux
reddit
Used saved chrome shortcuts as default applications for filetype
Hello, For quite some time now, most popular browsers allowed their users to save shortcuts to websites as standalone applications - resulting...
Anyone running a Samsung Slate 7 700T?
I see the Samsung Slate 7 700T on Ebay a lot, usually with no charger, pen dock or keyboard.
Anyone running one of these?
There's an install guide on the Arch wiki and it seems everything works.
For the ebay prices this looks to be a fun little linux project, the older i5 4gb ram and wacom display strike me as making this quite a usable little thing.
I assume a MS surface device would be the more mainstream option, but I'm interested to hear anyone's thoughts on this device
https://redd.it/ldsbhf
@r_linux
I see the Samsung Slate 7 700T on Ebay a lot, usually with no charger, pen dock or keyboard.
Anyone running one of these?
There's an install guide on the Arch wiki and it seems everything works.
For the ebay prices this looks to be a fun little linux project, the older i5 4gb ram and wacom display strike me as making this quite a usable little thing.
I assume a MS surface device would be the more mainstream option, but I'm interested to hear anyone's thoughts on this device
https://redd.it/ldsbhf
@r_linux
reddit
Anyone running a Samsung Slate 7 700T?
I see the Samsung Slate 7 700T on Ebay a lot, usually with no charger, pen dock or keyboard. Anyone running one of these? There's an install...
Windows loader from Linux
I love Linux and its been my operating system of choice for years however the one thing I miss from Windows is seamless gaming. I dual boot Windows however it is a pain to have to end my Linux environment to switch over for gaming every time as gaming is the only reason I need windows. does some type of application/os exist that will save the state of both operating systems and allow you to switch back and forth without having to manually power down and select your os via grub, while recovering the state of the other os? I have thought about dumping the ram to the hard disk and loading it next boot, however from what I have read it comes with a lot of challenges.
https://redd.it/ldzzf7
@r_linux
I love Linux and its been my operating system of choice for years however the one thing I miss from Windows is seamless gaming. I dual boot Windows however it is a pain to have to end my Linux environment to switch over for gaming every time as gaming is the only reason I need windows. does some type of application/os exist that will save the state of both operating systems and allow you to switch back and forth without having to manually power down and select your os via grub, while recovering the state of the other os? I have thought about dumping the ram to the hard disk and loading it next boot, however from what I have read it comes with a lot of challenges.
https://redd.it/ldzzf7
@r_linux
reddit
Windows loader from Linux
I love Linux and its been my operating system of choice for years however the one thing I miss from Windows is seamless gaming. I dual boot...
Respond to desktop notifications (from Slack) directly from dmenu/rofi
Hi. I use dunst as my notification daemon, and it's built in with this action list that launches dmenu, so you can choose between opening up the tab that launched the notification or whatever.
I get a lot of slack message notifications this way, and I realized it might make a lot of sense to be able to actually reply to a message received on slack by typing in dmenu/rofi.
I can't find any prior work on this really, I'm curious if anyones tried to noscript this together. If not I guess I'll give it a shot.
https://redd.it/le0l9d
@r_linux
Hi. I use dunst as my notification daemon, and it's built in with this action list that launches dmenu, so you can choose between opening up the tab that launched the notification or whatever.
I get a lot of slack message notifications this way, and I realized it might make a lot of sense to be able to actually reply to a message received on slack by typing in dmenu/rofi.
I can't find any prior work on this really, I'm curious if anyones tried to noscript this together. If not I guess I'll give it a shot.
https://redd.it/le0l9d
@r_linux
reddit
Respond to desktop notifications (from Slack) directly from dmenu/rofi
Hi. I use dunst as my notification daemon, and it's built in with this action list that launches dmenu, so you can choose between opening up the...
Any free certification exams like Plesk certs exams
Just like Plesk has its certification exams for free.
Plesk Obsidian Professional
Plesk Obsidian for Linux Expert
Do you know any else IT exams which we can give without any fee (please don't say LinkedIn Skill Assessments)
https://redd.it/ldrxkg
@r_linux
Just like Plesk has its certification exams for free.
Plesk Obsidian Professional
Plesk Obsidian for Linux Expert
Do you know any else IT exams which we can give without any fee (please don't say LinkedIn Skill Assessments)
https://redd.it/ldrxkg
@r_linux
reddit
Any free certification exams like Plesk certs exams
Just like Plesk has its certification exams for free. Plesk Obsidian Professional Plesk Obsidian for Linux Expert Do you know any else IT...
How Linux made me BEST Intern in just 30 min. I LOVE LINUX <3
While my other friends are busy with learning javanoscript I spend my summer learning about bash and old school unix programs like awk, sed, cut, paste, grep, regex, etc. and during my internship I realized how awesome these programs are I automated all my internship work with bash using these tools, I earn lot of money by doing nothing. I even made a youtube channel where I show people how these small programs can make you a computer wizard.
Enough talk now let me show you an example of this -
BTW I also have a detailed Video explaination on this too.
So one day my boss gave me a very urgent task.
Task \- Find 300 short stories.
Conditions -
Stories should be Non Copyrighted. Means - I cannot pick stories from random website.
Remove all expletive words from Story's text.
Create google doc files for all 300 stories
Doc file noscript must be same as story noscript.
Do all of this in just 30 min (WTF?)
Note : Even my boss was aware this is almost impossible to do this in just 30 min. So he was just asking politely - Can you do this?
AND since he had lot of deadline stress. I said YES. Because I got an idea.
>Then I played mr robot [main theme music](https://www.youtube.com/watch?v=XMEXPkPmmq0) and open Terminal \HACKERMAN* (sorry)
​
First I need to get Non Copyrighted stories.
I can use reddit for this ( r/ShortyStories , r/shortstories, r/sadstories ). I can get stories from here.
So If you add `.json` in the end of any reddit url and you will get json output instead of webpage.
curl -s -H "User-agent: 'your bot 0.1'" \
https://www.reddit.com/r/ShortyStories/top.json\?t\=all\&limit\=300 > story.json
With this simple curl magic I got a `story.json` file which contain 300 posts.
Now with a simple python noscript -
$ cat magic.py
import json
with open('story.json') as f:
lol = json.load(f)
for x in lol['data']['children']:
print("# " + x['data']['noscript'])
print(x['data']['selftext'])
$ python magic.py > stories.txt
I fetched all noscripts & stories text from my json file. Notice I used `#` Before printing noscript.
Now with these 3 simple commands I remove all useless text written between brackets [\], useless urls and expletive words (I downloaded a badwords.txt from github which contain huge list of expletive words.
​
sed 's/[.]//g' story.txt
sed -i -e 's!http[s]\?://\S!!g' story.txt
while read word ; do sed -i "s/\s$word\s//gi" ; done < badwords.txt
Then I use simple awk magic to split all stories into different markdown files -
​
awk -v n=100 '/^#/{n++}{print > n ".md"}' story.txt
Imagine doing this without awk! So this way I created 300 markdown files and each file contain -
# Title of story
And then some text of story
and My file names were like -> 101.md 102.md 103.md 104.md .... 400.md
Then I used pandoc to convert my markdown files into docx files
​
for f in .md ; do pandoc -s -o $f.docx $f ; done
Now I created a list of noscripts and then sanitize my noscripts to remove spaces and some special characters -
​
grep -E "^#" story.txt > noscripts.txt
sed -i -e 's/^A-Za-z0-9 //g' noscripts.txt
sed -i 's/ /-/g' noscripts.txt
Then I wrote this simple bash noscript to rename my files -
​
#!/bin/bash
i=101 # first file name is 101.md
while read noscript;
do
mv $i.md.docx $noscript.docx
((i=i+1))
done<noscript.txt
At last I move these .docx files into a stories directory and upload this directory on my google drive. Make a shareable link of the folder and send it to my boss.
OMG I Love Linux. Can you do this one Windows? My boss was very happy and he declared me best intern which means BONUS .. MONEY MONEY MONEY!
So Go on learn to use terminal and try to apply it in your daily life problems. because -
>Knowing is not enough, you must apply
>
>willing is not
While my other friends are busy with learning javanoscript I spend my summer learning about bash and old school unix programs like awk, sed, cut, paste, grep, regex, etc. and during my internship I realized how awesome these programs are I automated all my internship work with bash using these tools, I earn lot of money by doing nothing. I even made a youtube channel where I show people how these small programs can make you a computer wizard.
Enough talk now let me show you an example of this -
BTW I also have a detailed Video explaination on this too.
So one day my boss gave me a very urgent task.
Task \- Find 300 short stories.
Conditions -
Stories should be Non Copyrighted. Means - I cannot pick stories from random website.
Remove all expletive words from Story's text.
Create google doc files for all 300 stories
Doc file noscript must be same as story noscript.
Do all of this in just 30 min (WTF?)
Note : Even my boss was aware this is almost impossible to do this in just 30 min. So he was just asking politely - Can you do this?
AND since he had lot of deadline stress. I said YES. Because I got an idea.
>Then I played mr robot [main theme music](https://www.youtube.com/watch?v=XMEXPkPmmq0) and open Terminal \HACKERMAN* (sorry)
​
First I need to get Non Copyrighted stories.
I can use reddit for this ( r/ShortyStories , r/shortstories, r/sadstories ). I can get stories from here.
So If you add `.json` in the end of any reddit url and you will get json output instead of webpage.
curl -s -H "User-agent: 'your bot 0.1'" \
https://www.reddit.com/r/ShortyStories/top.json\?t\=all\&limit\=300 > story.json
With this simple curl magic I got a `story.json` file which contain 300 posts.
Now with a simple python noscript -
$ cat magic.py
import json
with open('story.json') as f:
lol = json.load(f)
for x in lol['data']['children']:
print("# " + x['data']['noscript'])
print(x['data']['selftext'])
$ python magic.py > stories.txt
I fetched all noscripts & stories text from my json file. Notice I used `#` Before printing noscript.
Now with these 3 simple commands I remove all useless text written between brackets [\], useless urls and expletive words (I downloaded a badwords.txt from github which contain huge list of expletive words.
​
sed 's/[.]//g' story.txt
sed -i -e 's!http[s]\?://\S!!g' story.txt
while read word ; do sed -i "s/\s$word\s//gi" ; done < badwords.txt
Then I use simple awk magic to split all stories into different markdown files -
​
awk -v n=100 '/^#/{n++}{print > n ".md"}' story.txt
Imagine doing this without awk! So this way I created 300 markdown files and each file contain -
# Title of story
And then some text of story
and My file names were like -> 101.md 102.md 103.md 104.md .... 400.md
Then I used pandoc to convert my markdown files into docx files
​
for f in .md ; do pandoc -s -o $f.docx $f ; done
Now I created a list of noscripts and then sanitize my noscripts to remove spaces and some special characters -
​
grep -E "^#" story.txt > noscripts.txt
sed -i -e 's/^A-Za-z0-9 //g' noscripts.txt
sed -i 's/ /-/g' noscripts.txt
Then I wrote this simple bash noscript to rename my files -
​
#!/bin/bash
i=101 # first file name is 101.md
while read noscript;
do
mv $i.md.docx $noscript.docx
((i=i+1))
done<noscript.txt
At last I move these .docx files into a stories directory and upload this directory on my google drive. Make a shareable link of the folder and send it to my boss.
OMG I Love Linux. Can you do this one Windows? My boss was very happy and he declared me best intern which means BONUS .. MONEY MONEY MONEY!
So Go on learn to use terminal and try to apply it in your daily life problems. because -
>Knowing is not enough, you must apply
>
>willing is not
YouTube
30 min of Terminal Magic made me BEST Intern
So I got this very urgent task on my internship. Which was almost impossible to do manually. So I open my Linux Terminal to do this trick which saves the day.
I am a guy from UP bareilly India. Who love Computers/Linux/Programming.
I enjoy making Tech videos.…
I am a guy from UP bareilly India. Who love Computers/Linux/Programming.
I enjoy making Tech videos.…
Overview Linux Distros,Desktops (Everybody can help)
Hi I want to create a clear overview of the most relevant distributions + desktops especially for beginners to make their change to the right operating system as easy as possible. But of course i need your help to create a brilliant overview for anyone.
After finishing i will upload it in r/linux
In the following i will show you my thoughts how i would structure it. There is NO specific order just an overview of my thoughts (any advices,additions are welcome)
‼️Reminder only the most relevant (no gentoo,...)‼️
💽Distributions💽
1. Experience with Linux:
Beginner | Advanced | Pro
2. Base (head) Distros:
Debian | SLS | Arch
3. Main Distros:
Ubuntu | Red Hat Linux | Debian | Arch
4. Derivatives:
-Ubuntu
Elementary os | Linux Mint | Zorin os
-Red Hat Linux
Fedora | Cent os
-Arch
Manjaro
🖥️Desktop Environments🖥️
1. Resource consumption:
Low | Medium | High
2.Desktops:
KDE Plasma | Gnome | XFCE | Deepin | Cinnamon
https://redd.it/ldsoeq
@r_linux
Hi I want to create a clear overview of the most relevant distributions + desktops especially for beginners to make their change to the right operating system as easy as possible. But of course i need your help to create a brilliant overview for anyone.
After finishing i will upload it in r/linux
In the following i will show you my thoughts how i would structure it. There is NO specific order just an overview of my thoughts (any advices,additions are welcome)
‼️Reminder only the most relevant (no gentoo,...)‼️
💽Distributions💽
1. Experience with Linux:
Beginner | Advanced | Pro
2. Base (head) Distros:
Debian | SLS | Arch
3. Main Distros:
Ubuntu | Red Hat Linux | Debian | Arch
4. Derivatives:
-Ubuntu
Elementary os | Linux Mint | Zorin os
-Red Hat Linux
Fedora | Cent os
-Arch
Manjaro
🖥️Desktop Environments🖥️
1. Resource consumption:
Low | Medium | High
2.Desktops:
KDE Plasma | Gnome | XFCE | Deepin | Cinnamon
https://redd.it/ldsoeq
@r_linux
reddit
Overview Linux Distros,Desktops (Everybody can help)
Hi I want to create a clear overview of the most relevant distributions + desktops especially for beginners to make their change to the right...