Skip to content

Instantly share code, notes, and snippets.

View beruic's full-sized avatar

Jimmy Merrild Krag beruic

View GitHub Profile
#!/usr/bin/env bash
dpkg -s powerline > /dev/null
POWERLINE_INSTALLED=$?
if [[ "$POWERLINE_INSTALLED" -ne "0" ]]; then
sudo apt install powerline
#From https://powerline.readthedocs.io/en/master/usage/shell-prompts.html
read -r -d '' BASHRC_CONTENT <<- EOM
@beruic
beruic / ini.ps1
Last active August 26, 2024 21:05
Read INI files in PowerShell
function Get-IniFile {
<#
.SYNOPSIS
Read an ini file.
.DESCRIPTION
Reads an ini file into a hash table of sections with keys and values.
.PARAMETER filePath
The path to the INI file.
# Add the Microsoft repository signing key to be able to verify downloaded packages
wget -O- -q https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# Add the repository
sudo wget -q https://packages.microsoft.com/config/ubuntu/16.04/prod.list -O /etc/apt/sources.list.d/mssql-release.list
# Update package lists
sudo apt update
# Install packages