This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo dnf install -y virt-viewer | |
| sudo mv ~/Downloads/CentOS-Stream-8-20240603.0-x86_64-dvd1.iso /var/lib/libvirt/images/ | |
| sudo chown qemu:qemu /var/lib/libvirt/images/CentOS-Stream-8-20240603.0-x86_64-dvd1.iso | |
| sudo virt-install \ | |
| --name utshaw_vm \ | |
| --memory 4096 \ | |
| --vcpus 4 \ | |
| --cpu host-passthrough \ | |
| --disk path=/var/lib/libvirt/images/utshaw_vm.qcow2,size=20,format=qcow2 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| echo "---- Removing all existing YUM repo files ----" | |
| sudo rm -f /etc/yum.repos.d/*.repo | |
| echo "---- Creating BaseOS repo ----" | |
| sudo tee /etc/yum.repos.d/CentOS-Stream-BaseOS.repo >/dev/null << 'EOF' | |
| [baseos] | |
| name=CentOS Stream 8 - BaseOS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.1.tar.xz | |
| tar -xf linux-5.3.1.tar.xz | |
| cd linux-5.3.1 | |
| # mm/migrate.c | |
| 1486: EXPORT_SYMBOL(migrate_pages); | |
| # mm/vmscan.c | |
| 1023: EXPORT_SYMBOL(putback_lru_page); | |
| 1822: EXPORT_SYMBOL(isolate_lru_page); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| int main() { | |
| vector<vector<int>*> starship; | |
| vector<int> midship; | |
| midship.push_back(50);midship.push_back(80);midship.push_back(40);midship.push_back(45); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| namespace Math { | |
| int add(int a, int b) { | |
| return a + b; | |
| } | |
| } | |
| int main() { | |
| std::cout << Math::add(5, 3) << std::endl; // Outputs: 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| int main() { | |
| #ifdef _WIN32 | |
| std::cout << "Running on Windows" << std::endl; | |
| #elif __APPLE__ | |
| std::cout << "Running on macOS" << std::endl; | |
| #elif __linux__ | |
| std::cout << "Running on Linux" << std::endl; | |
| #else |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Scenario: | |
| # pip refers to python3 | |
| # python refers to python2 | |
| # pip install doesn't work for python instead works for python3 | |
| # Problem: Can't install modules for python2 | |
| #______________________________________________________________ | |
| # Solution: | |
| curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
| python get-pip.py | |
| # Now pip install this way below (dnspython is the interesting module): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo find / -iname "*tomcat*" ! -path "/media/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find ~/ -iname "gimp" # find where gimp script directory is located | |
| cd /home/utshaw/snap/gimp/273/.config/GIMP/2.10/scripts/ | |
| wget https://web.archive.org/web/20180208191139/http://registry.gimp.org:80/node/28566 |
NewerOlder