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
| Setting up a VirtualBox Machine and Preparing a Kubernetes Cluster | |
| Step 1: Download OVA Image | |
| Download the Ubuntu 25.04 Server Cloud image from: | |
| https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-amd64.ova | |
| Step 2: Import to VirtualBox | |
| * File > Import Appliance | |
| * Set: |
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 | |
| # Directory containing the themes | |
| THEME_DIR=~/.oh-my-zsh/themes/ | |
| # Path to the temporary file storing the theme index | |
| INDEX_FILE=~/.theme_index | |
| # Function to change the theme | |
| change_theme() { |
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
| vlc --extraintf=http --http-host 127.0.0.1 --http-port 8081 --http-password any_password | |
| vlc --extraintf=http --http-host 127.0.0.1 --http-port 8082 --http-password any_password | |
| set CURLOPT_USERPWD=":any_password" | |
| curl -u %CURLOPT_USERPWD% http://127.0.0.1:8082/requests/status.xml?command=pl_pause & curl -u %CURLOPT_USERPWD% http://127.0.0.1:8081/requests/status.xml?command=pl_pause |
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
| #prepare bashrc | |
| read -p 'Pick username: ' user | |
| #[ -d $user ] && echo "WARNING! User already exists!" || mkdir ~/$user | |
| if [[ ! -d $user ]]; then | |
| mkdir $user | |
| else | |
| echo "WARNING! User already exists! Overwrite?" | |
| read -p "" -n 1 -r | |
| echo # (optional) move to a new line |
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
| volumeMounts: | |
| - mountPath: /usr/share/nginx/html/ | |
| name: log-volume | |
| volumes: | |
| - name: log-volume | |
| hostPath: | |
| # directory location on host | |
| path: /tmp/username | |
| # this field is optional |
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
| #Manual Setup of Master cluster node | |
| swapoff -a | |
| sudo apt-get update && sudo apt-get upgrade -y | |
| sudo apt install curl -y |
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
| terraform { | |
| required_providers { | |
| aws = { | |
| source = "hashicorp/aws" | |
| version = "~> 3.0" | |
| } | |
| } | |
| } | |
| ### Configure the AWS Provider |
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
| #Source: https://www.reddit.com/r/PowerShell/comments/5fxsqj/dynamically_get_current_version_of_vlc_and/ | |
| $vlcURL = "https://download.videolan.org/vlc/last/win32/" | |
| $getHTML = (New-Object System.Net.WebClient).DownloadString($vlcURL) | |
| $name = if ($getHTML -match '.+>(vlc-.+\.exe)<.+') | |
| { | |
| $Matches[1] | |
| } | |
| $vlcURL = "https://download.videolan.org/vlc/last/win32/$name" | |
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
| mkdir ~/.tmux | |
| mkdir ~/.tmux/plugins | |
| git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| cat <<EOF >> ~/.tmux.conf | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-resurrect' | |
| set -g @plugin 'tmux-plugins/tmux-sessionist' | |
| run -b '~/.tmux/plugins/tpm/tpm' | |
| EOF | |
| tmux source ~/.tmux.conf |
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
| LeetCode April 1 | |
| //from array give a number which not repeats | |
| /** | |
| * @param {number[]} nums | |
| * @return {number} | |
| */ | |
| var singleNumber = function(nums) { | |
| for (var i=0; i<=nums.length;i++) | |
| { |
NewerOlder