Skip to content

Instantly share code, notes, and snippets.

View satrapu's full-sized avatar

Bogdan Marian satrapu

View GitHub Profile
@satrapu
satrapu / Microsoft.PowerShell_profile.ps1
Created October 23, 2019 18:54
Prompt customizations for the PowerShell console running inside Windows Terminal
# Prompt based on https://hodgkins.io/ultimate-powershell-prompt-and-git-setup
# Edit this file via running the following PS command: if (!(Test-Path -Path $PROFILE)){ New-Item -Path $PROFILE -ItemType File } ; ise $PROFILE
function prompt {
$realLASTEXITCODE = $LASTEXITCODE
Write-Host
Write-Host "$ENV:USERNAME@" -NoNewline -ForegroundColor DarkYellow
Write-Host "$ENV:COMPUTERNAME" -NoNewline -ForegroundColor Magenta
if ($s -ne $null) {
@satrapu
satrapu / pageant-autoload-keys-at-startup.txt
Last active December 19, 2020 13:57 — forked from chunter/pageant-autoload-keys-at-startup.txt
Make Pageant autoload keys at startup
Prerequisites:
- Install PuTTY by following the steps found here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html.
- Generate your SSH private/public key pair
- Convert the SSH private key to ppk format using puttygen.exe, file located in the same folder where you have installed PuTTY
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@satrapu
satrapu / env.sh
Last active August 24, 2017 07:52
Oh, my ZSH! Portainer alias for Linux
# This alias is used for replacing the current Portainer Docker container with a given version.
# This is a fragment from your custom configuration file you have specified when you setup Oh, my ZSH! on your machine.
#
# The alias works on Ubuntu 16.04, but it should also work on other Linux distributions as well.
# It doesn't work on MacOS, since the provided xargs tool doesn't have the --no-run-if-empty option; you'll need to
# modify it to have it work on this OS too.
#
# Oh, my ZSH! can be found here: http://ohmyz.sh/.
# Portainer, "the easiest way to manage Docker", can be found here: https://portainer.io/.
#----------------------
@satrapu
satrapu / hello-world.yml
Created August 2, 2017 18:12
Ansible playbook which prints a simple debug message.
---
# This playbook prints a simple debug message
- name: Echo
hosts: 127.0.0.1
connection: local
tasks:
- name: Print debug message
debug:
msg: Hello, world!