Skip to content

Instantly share code, notes, and snippets.

View Erisa's full-sized avatar
💕

Erisa A Erisa

💕
View GitHub Profile
@Erisa
Erisa / prompt.ps1
Last active January 1, 2020 10:03 — forked from Ovyerus/prompt-preview.png
Hot powershell prompt
function prompt {
$lastCmdFailed = !$?;
$asciiSymbols = $true # If your terminal doesn't display unicode properly
# Cause $IsWindows and shit doesn't exist on current Windows Powershell version
$windows = $IsWindows -or $env:OS -eq 'Windows_NT'
if ($windows) {
$admin = [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match 'S-1-5-32-544')
$name = $env:UserName
@Erisa
Erisa / config.fish
Created February 16, 2020 01:12 — forked from Ovyerus/config.fish
Sexy fish prompt
set -g symb '▲'
set -g leading_brace 0
set -g has_launched 0
function git_info
set -l branch (git rev-parse --abbrev-ref HEAD 2> /dev/null)
printf "%s(%s%s%s)" $c0 $c1 $branch $c0
set -l changes (git status --porcelain --ignore-submodules 2> /dev/null)
@Erisa
Erisa / create-cloud-template.sh
Created April 20, 2023 22:52 — forked from meramsey/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@Erisa
Erisa / node_exporter.sh
Last active December 13, 2023 23:50 — forked from galexrt/node_exporter.sh
Simple Prometheus node_exporter install script (Updated for 1.0.1)
#!/bin/bash
set +x
version="${VERSION:-1.6.1}"
arch="${ARCH:-linux-amd64}"
bin_dir="${BIN_DIR:-/usr/local/bin}"
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \
-O /tmp/node_exporter.tar.gz