This file contains 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
# Get DB schema MySQL format and delete exit container. | |
# Remember run in server to setup structure. | |
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql | |
docker rm $(docker ps --filter status=exited -q) |
This file contains 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
import urllib.request | |
import xml.etree.ElementTree as ET | |
repository_url = "https://repo.maven.apache.org/maven2/" | |
package_name = "org.junit.jupiter.junit-jupiter-api" | |
metadata_url = repository_url + package_name.replace('.', '/') + "/maven-metadata.xml" | |
# Send a GET request and retrieve the XML content | |
with urllib.request.urlopen(metadata_url) as response: |
This file contains 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
<# | |
.Synopsis | |
Generate new UUID. | |
.Description | |
Powershell script to generate new UUID for different purpose. | |
.Parameter count | |
Optional parameter to specific number of UUID to be generated. By default it is 1 and maxium 500. |
This file contains 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=$args[0] | |
$destination=$args[1] | |
$repoHome=$args[2] | |
$sourceUrl=[uri]$source | |
$folderName=$repoHome+"\\"+$source.Split('/')[-1]+".git" | |
cd $repoHome | |
git clone $source --mirror | |
cd $folderName | |
git push $destination --mirror |
This file contains 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 -s "https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/maven-metadata.xml" | xmllint --xpath "//metadata/versioning/release/text()" - |
This file contains 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
# Install oh-my-posh and add executable permission. | |
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh | |
sudo chmod +x /usr/local/bin/oh-my-posh | |
# Setup themes and set permission. | |
mkdir ~/.poshthemes | |
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip | |
unzip ~/.poshthemes/themes.zip -d ~/.poshthemes | |
chmod u+rw ~/.poshthemes/*.json |
This file contains 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 apt-get update -y | |
sudo apt-get upgrade -y | |
sudo apt-get clean |
This file contains 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
choco upgrade -y all --ignore-checksums |
This file contains 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
/** | |
* Remove array element(s) by value. | |
* @param {Value to be remove} value | |
* @returns Array which removed value. | |
*/ | |
Array.prototype.remove = function(value) { | |
let index = 0; | |
do { | |
index = this.indexOf(value); | |
if(index >=0) |