https://mytechservinginternetmeals.blogspot.com/2021/10/how-to-start-making-browser-video-game.html
more updated -- I'm creating 3d skatepark copy, my work here - https://drive.google.com/file/d/1ubGOpjX6iTFSM6sqyeyg6N8JndwVKoew/view?usp=sharing https://ibb.co/b1HTJtGceturtdiena, 2021. gada 23. decembris
Updated
piektdiena, 2021. gada 5. novembris
VIDEO EDITOR CONSOLE. *PSEUDO* CODE. (NOT FINISHED - MIGHT WORK!!)
IF YOU ALWAYS WANTED VIDEO EDITOR THAT JUST TRIMS AND MERGES CLIPS BASED ON CONSOLE INPUT - HERE IS THE C++ VERSION SOURCE CODE.
HOW TO COMPILE? INSTALL g++ AND ffmpeg (CODE IS FOR LINUX SO FAR!!!)
sudo apt install g++
then create new file editor.cpp
compile the file from command line -
g++ -std=c++17 editor.cpp -o editor
copy binary (editor) to /home/ and run the binary ./editor
#include <string>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <algorithm>
#include <unistd.h>
//g++ -std=c++17 editor.cpp -o editor
namespace fs = std::filesystem;
bool in_array(const std::string & value,
const std::vector < std::string > & array) {
return std::find(array.begin(), array.end(), value) != array.end();
}
int main() {
//get username
std::string Username = getlogin();
//opens file list
system((std::string("cat /home/") + Username + std::string("/renders/mylist.txt")).c_str());
//asks which folder should program choose
std::string mape;
std::cout << "Kura mape?" << "!\n";
std::cin >> mape;
//asks which file name should final render choose
std::cout << "Final faila nosaukums? !\n";
std::string finalnosaukums;
std::cin >> finalnosaukums;
std::string path = "/home/" + Username + mape;
std::vector < std::string > arr;
int guesses = 0;
//counts how many files are in choosed directory
auto dirIter = std::filesystem::directory_iterator(mape);
int fileCount = 0;
for (auto& entry : dirIter)
{
if (entry.is_regular_file())
{
++fileCount;
}
}
for (const auto & entry: fs::directory_iterator(path)) {
std::string name;
std::cout << "Kurais video? !\n";
std::cout << entry.path() << std::endl;
std::cin >> name;
if (in_array(name, arr)) {
//std::cerr << "Found at position " << std::distance(std::array, foo) << endl;
std::cout << "Kurais video? !\n";
std::cin >> name;
std::cout << "Masīva garums. jeb cik video jau pievienoti:" << sizeof(arr) << "!\n";
std::cout << entry.path() << std::endl;
} else {
std::cout << "Not found" << std::endl;
arr.push_back(name);
}
std::cout << entry.path() << name << "!\n";
}
for (const auto & entry2: fs::directory_iterator(path)) {
guesses++;
std::string name2;
std::cout << "Kurais video?" << name2 << "!\n";
std::cout << entry2.path() << std::endl;
std::cin >> name2;
if (in_array(name2, arr)) {
//std::cerr << "Found at position " << std::distance(garumi, foo) << endl;
std::cout << "Kurais video?" << name2 << "!\n";
std::cin >> name2;
//std::cout << "Masīva garums. jeb cik video jau pievienoti:" << size << "!\n";
std::cout << entry2.path() << std::endl;
} else {
std::cout << "Not found" << std::endl;
if (in_array(name2, arr)) {
system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
int vienav = system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
std::cout << "No kuras sekundes sākt? !\n";
int sakums;
std::cin >> sakums;
std::cout << "No kuras sekundes beigt? !\n";
int beigas;
std::cin >> beigas;
if (vienav > beigas) {
system((std::string("ffmpeg -i name2 -ss") + std::to_string(sakums) + std::string("to") + std::to_string(beigas) + std::string("-c:v libx264 -crf 30 trim_opseek") + name2).c_str());
} else {
system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
std::cout << "PARSNIEDZI LIMITU ... No kuras sekundes beigt" << beigas << "!\n";
}
}
}
std::cout << entry2.path() << name2 << "!\n";
}
if(fileCount === guesses){
system((std::string("ffmpeg -f concat -safe 0 -i mylist.txt -c copy /home/") + Username + std::string("/renders"), finalnosaukums).c_str());
}
}
svētdiena, 2021. gada 24. oktobris
HOW TO START MAKING BROWSER VIDEO GAME WITH PREMADE GAME CODE? (STARTING POINT FAST, NOT FOR COMPUTER ILLITERATES)
trešdiena, 2021. gada 22. septembris
HOW TO SCREEN RECORD UBUNTU?
If ffmpeg -encoders |grep h264 output NVIDIA HVEC somewhere there, ubuntu uses hardware encoding by default.
ffmpeg -f x11grab -video_size 1920x1080 -framerate 60 -i :1 -v verbose -f pulse -i default -vf format=yuv420p output.mp4
ffmpeg -f x11grab -video_size 1920x1080 -framerate 60 -i :0 -v verbose -f pulse -i default -vf format=yuv420p output.mp4
otrdiena, 2021. gada 21. septembris
otrdiena, 2021. gada 15. jūnijs
Managing LVM Snapshots/ recording desktop on ubuntu / modified pnmixer volume slider for openbox tint2
https://wiki.learnlinux.tv/index.php/Managing_LVM_Snapshots_on_Arch_Linux
ffmpeg -video_size 1366x768 -framerate 30 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i 0 -c:v libx264rgb -crf 0 -preset ultrafast sample.mkvcreate system wide shortcut - sudo geany ~/.local/share/applications/pmx.desktop
pirmdiena, 2021. gada 14. jūnijs
Make Nautilus 3.26.4 for ubuntu 18.04 log copy/move/delete/rename actions. (UPDATED SECOND TIME) HIGHLY EXPERIMENTAL
I PERSONALLY THINK VANILLA VERSION ON UBUNTU IS FAILURE SO THIS ARTICLE DOES NOT MAKE A SENSE UNTIL OPENSOURCE COMMUNITY FIXES NAUTILUS ITSELF ON ANY DISTRO, BUT CMMON.
First of all, this Nautilus version will use Vanilla theme. (Might fix the styling issues for ubuntu 18.04 later.) Second of all, it does not log location of files that are renamed using it. Third of all, logged files have missing extensions. (So far these are only bugs there is to this code). So while using this version, I take no responsibility over it's doings as it is simply few lines of code added to few functions - IN NUTSHELL - https://paste.ubuntu.com/p/PvpBM6dMw5/.
Link to flatpak file (org.gnome.NautilusDevel.flatpak)-
https://drive.google.com/file/d/1sgXckMoXQmfm38nEfqWJ-k0OGDH17Tiv/view?usp=sharing
TO RUN YOUR NAUTILUS FLATPAK OR BUILD IT BY GNOME-BUILDER YOU NEED TO INSTALL FLATPAK ETC but ONCE YOU HAVE BUILDER INSTALLED WITH WORKING BUILDED APP YOU CAN GET APPLICATION THAT DOES NOT NEED FLATPAK - https://stackoverflow.com/questions/60800783/can-gnome-builder-actually-produce-something-else-than-flatpaks
sudo apt install flatpak
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Platform//3.28\
sudo flatpak --user install org.gnome.NautilusDevel.flatpak
IF EVERYTHING GOES WRONG:
flatpak uninstall --unused
sudo apt-get remove --autoremove flatpak
sudo apt-get purge flatpak
sudo rm -rf /var/lib/flatpak $HOME/.local/share/flatpak
To run Your Nautilus flatpak - flatpak run org.gnome.NautilusDevel . Log files are saved under /home/username/ directory.
Remember, this is flatpak and it will not replace original system wide used Nautilus, SO after doing this, original system wide used Nautilus, will still not have these features, but they will be USABLE ONLY FROM flatpak version.
In case You want to compile, follow article (There are some tips on creating system wide shortcuts at the end of it, and running Your flatpak Nautilus - >
For logging copy/move/delete functionality, here is the - nautilus-file-operations.c file - https://paste.ubuntu.com/p/kRhQFtZj4Q/
For logging renaming - here is the - nautilus-files-view.c file -
https://paste.ubuntu.com/p/PxwnBRQYmR/
(logging renaming does not include location of where files are renamed, or which ones are renamed)
Install gnome-builder - (don't run as root)
flatpak install --user --from https://flathub.org/repo/appstream/org.gnome.Builder.flatpakref flatpak run --user org.gnome.Builder Install gnome-builder -
Run gnome-builder -
flatpak run org.gnome.Builder -vvvv
Select Nautilus and choose this repository -
VANILLA VERSION -
https://gitlab.gnome.org/chrism/nautilus.git
UBUNTU VERSION -
https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus
Modify nautilus-file-operations.c and nautilus-files-view.c in source file directory (src).
Build and Export bundle.
create system wide shortcut - sudo geany ~/.local/share/applications/NEWNAUTILUS.desktop
svētdiena, 2021. gada 13. jūnijs
HOW TO GREP ON WINDOWS / favorite wallpaper
If You use command line You might want to know following commands using linux:
cd / ls (dir in windows) / pwd / uname -a / cp / rm / rmdir / chmod / chown / find
but one of the crazy features and all time needed features is searching text in files recursively (scanning through all the subfolders), and for linux it is grep -r "text you want to find".
windows on other hand:
findstr /s /i STRING *.*
get-childitem -recurse FILENAME
this article is not going to be long or explanatory, but if You research these basic commands and learn how to use them while doing You computer tasks, You be upgrading Your intelligence and skill set,
what I suggest is also, learning how to: compile c and c++ program's on linux and windows, learning to compile python, write html and php, JAVASCRIPT, learn some bash/cmd scripts
and overall, check my github account github.com/lv88h - projects like https://github.com/lv88h/GOING_DOWN_THE_RABBIT_HOLE_IN_PHP explain the algorithm that draws pixels in images on screen from such data types as arrays.
https://github.com/lv88h/game-controller - shows an example of how game controller or any controller might be written in code (in this following example the code is in javascript).
How to open command line TTY if Ubuntu has been stuck to kill guilty processes? HOW TO START PC IN RECOVERY OR BIOS?
ESCAPE OR SHIFT WHILE STARTING - MORE ABOUT RECOVERY (https://www.maketecheasier.com/boot-recovery-mode-ubuntu/)
F2 FOR BIOS.
You can get to tty3 by pressing Ctrl+Alt+F3, tty4 by pressing Ctrl+Alt+F4, tty5 by pressing Ctrl+Alt+F5 and tty6 by pressing Ctrl+Alt+F6.
You can then switch between tty3-6 by pressing Alt with the appropriate F-key.
Login with Your current username and password. Commands like killall geany, killall google-chrome, will likely kill the process. Also You can use htop. Inside htop, search for process name You wanna kill by F4, then press F9, press 9 (sigkill) and ENTER.
Finally, you can get back to the GUI with Alt+F1 for the login chooser or Alt+F2 for the logged-in user's desktop.
IF THE GUI been stuck try Ctrl+Alt+Backspace
- Alt+SysRq+E send SIGTERM (termination) signal to all processes except mother init
sestdiena, 2021. gada 12. jūnijs
Create bootable Ubuntu USB stick
https://ubuntu.com/tutorials/create-a-usb-stick-on-windows - windows
create startup disk on ubuntu.