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
| ----------------------------------------------------------------------------------------------------- | |
| #Debian | |
| sudo apt-get install puppet -y | |
| #RedHat | |
| rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm | |
| yes | sudo yum install puppet | |
| ls -l /etc/puppet | |
| facter | grep hostname | |
| ----------------------------------------------------------------------------------------------------- |
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
| -------------------------------------------------------------------------------------------------------------------------- | |
| $ git clone https://kevzettler@bitbucket.org/kevzettler/git-blame-example.git && cd git-blame-example | |
| $ git log | |
| $ git blame README.md | |
| $ git blame -L 1,5 README.md | |
| $ git blame -e README.md | |
| # list all original commits in-which a specific code piece was added or modified execute | |
| $ git log -S"This repository is an example of a project" --pretty=format:'%h %an %ad %s' |
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
| ------------------------------------------------------------------------------------------ | |
| curl -I -sS http://localhost:7777 | sed -n '1,6p' | |
| curl → makes a request to the given URL. | |
| -I → fetches only the HTTP headers (HEAD request instead of GET). | |
| -sS → silent mode (hides progress bar), but still shows errors if they occur. | |
| http://localhost:7777 → target URL (your web server running on port 7777). |
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
| ============================================================================================= | |
| Additional Checks for Windows 11: | |
| Virtualization Enabled: Ensure VT-x/AMD-V is enabled in BIOS/UEFI. | |
| Enable GUI temporarily for visual debugging: | |
| In the Vagrantfile, change vb.gui = false to vb.gui = true to see what's happening during boot |
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
| ============================================================================================= | |
| openBSD | |
| add repo url | |
| echo 'https://cdn.openbsd.org/pub/OpenBSD' > /etc/installurl | |
| $ doas pkg_add -xz python-2.7 ansible py-psycopg2 | |
| $ ansible --version | |
| ansible 2.8.5 | |
| $ doas pkg_add git |
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
| #check if pytorch is using the GPU | |
| python -c 'import torch; print(torch.cuda.is_available())' #should print True | |
| python -c 'import torch; print(torch.rand(2,3).cuda())' | |
| watch -n 2 nvidia-smi | |
| ========================================================================= | |
| import torch | |
| dev = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") |
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
| /var/log/pacman.log | |
| sudo pacman -Syu --noconfirm #Update and upgrade all packages on the system | |
| pacman -Sc #Clean package cache | |
| sudo pacman -Syy #Update package list | |
| pacman -Qe #List explictly-installed packages | |
| pacman -Qdt #List unneeded packages | |
| pacman -Rns $(pacman -Qdtq) #Uninstall unneeded packages |
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
| #pkg update | |
| # System configuration profiles are processed by SMF after OS package installation when a client first boots. | |
| #The Service Management Facility in Oracle Solaris 11 is used to configure systems and store related configuration data, allowing changes to persist across system updates. | |
| sysconfig create-profile -o profile.xml | |
| sysconfig configure -c sc-profile.xml #The resulting profile can be used with AI or as input to a sysconfig command | |
| kstat -p | grep link_ | grep bge # display network interface variables | |
| #vagrant sudoer |
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 -E minikube start --driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification #Some versions of Linux have a version of docker that is newer than what Kubernetes expects. To overwrite this, run minikube with the following parameters | |
| sudo minikube config set driver none #make none the default driver | |
| minikube start --alsologtostderr -v=4 #debug crashes | |
| sudo minikube start --profile=minikube --memory=8192 --cpus=4 --vm-driver=none --kubernetes-version=v$KUBERNETES_VERSION # The 'none' driver does not respect the --cpus flag ! The 'none' driver does not respect the --memory flag | |
| sudo minikube start --memory=8192 --cpus=4 --vm-driver="virtualbox" | |
| ------------------------------------------------------------------------------------------------ | |
| kubectl config use-context minikube #use kubectl to switch to the minikube context, so we can talk to the cluster | |
| ----------- |
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
| -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| #zsh shell (Z-Shell),Most versions of macOS ship with zsh pre-installed | |
| zsh --version | |
| chsh -s $(which zsh) #set zsh as the default shell | |
| chsh -s $(which bash) # revert to Bash | |
| chsh -s /usr/local/bin/zsh | |
| chsh -s /bin/zsh | |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| #Hosts File | |
| Windows 10 - "C:\Windows\System32\drivers\etc\hosts" |