Skip to content

Instantly share code, notes, and snippets.

View shanduur's full-sized avatar
🏠
Working from home

Mateusz Urbanek shanduur

🏠
Working from home
View GitHub Profile
@shanduur
shanduur / get_docker_cli.sh
Created April 12, 2023 18:44
Download Docker CLI when using remote Docker host or Colima
_get_docker() {
OS="$(uname -s)"
if [[ "${OS}" == "Darwin" ]]; then
OS="mac"
fi
# if arm64 then assume aaarch64
ARCH="$(uname -m)"
if [[ "${ARCH}" == "arm64" ]]; then
ARCH="aarch64"
@shanduur
shanduur / .profile
Created March 26, 2023 17:18
Updater Function for Shell
function upd8 {
# upd8 function should be run manually or through CRON.
# It is used to install updates to apps that do not have
# verry user friendly installation methods through brew/yum/apt,
# or you want to have the newest version installed by their 'up'
# scripts.
#
# Add this to your
# - .bashrc
# - .zshrc
#!/bin/bash -e
echo 'This script is used to build and push multi-arch images to a container registry.'
echo ''
echo 'The script is intended to be used in a CI/CD pipeline.'
echo ''
echo 'The following variables can be set:'
echo ''
echo '| variable | value | default value | required |'
echo '|----------------|---------------------------------------------------|-------------------------------|-----------------------------|'
#!/bin/bash
#########################################################################################
# UTILITES
#----------------------------------------------------------------------------------------
# determining if tput is installed, and then setting colors
which tput 2>&1 > /dev/null
if [[ $? -eq "0" ]]; then
_COLOR_NC="$(tput sgr0)"
@shanduur
shanduur / config.yml
Last active September 14, 2022 13:19
guild:
name: 'Example Test'
verification-level: 'High'
roles:
- name: 'role-0'
color: 'random'
separated: true
mentionable: true
rank: 0
#!/usr/bin/env bash
OS=$(uname -s)
ARCH=$(uname -m)
URL="https://github.com/docker/compose/releases/latest/download/docker-compose-${OS}-${ARCH}"
if [ -z ${OVERRIDE_PATH} ];
then
INSTALL_PATH="/usr/local/lib/docker/cli-plugins/docker-compose"
else
#!/usr/bin/env bash
# default username / password combination is:
# ubuntu:ubuntu
export DEFAULT_USER="ubuntu"
echo "default user: ${DEFAULT_USER}"
export CURRENT_USER=$(whoami)
echo "current user: ${CURRENT_USER}"
# Configuration
@shanduur
shanduur / vagrant.log
Created September 10, 2021 12:07
Vagrant debug output (issue)
This file has been truncated, but you can view the full file.
vagrant : INFO global: Vagrant version: 2.2.14
At line:1 char:1
+ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log"
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.2.14:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
INFO global: Ruby version: 2.6.6
INFO global: RubyGems version: 3.0.3
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.14\\gems\\vagrant-2.2.14\\bin\\vagrant"
@shanduur
shanduur / config.env
Last active August 26, 2021 10:01
VM on Raspberry Pi 3
export CLANG_VERSION="CLANG38"
export UBUNTU_RELEASE="focal"
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File", // requires ms-python.python extension
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},