Skip to content

Instantly share code, notes, and snippets.

View pushrbx's full-sized avatar

pushrbx pushrbx

View GitHub Profile
<template>
<div v-on-clickaway="clickAway">
<input type="text" class="form-control"
:value="value"
@focus="onFocus"
@input="onInput"
@keydown.enter.prevent="enter"
@keydown.down.prevent="down"
@keydown.up.prevent="up"
@keydown.tab="clickAway" />
# powershell profile for oh-my-posh if you install it with winget, otherwise you need to import the oh-my-posh module
Import-Module posh-git
$ohmyposhversion = $(oh-my-posh --version)
$ohmyposhthemepath = "~/.oh-my-posh/themes/agnoster/v$ohmyposhversion"
# download a theme if not yet downloaded
if ((test-path $ohmyposhthemepath) -ne $true) {
new-item -itemType Directory -force -path $ohmyposhthemepath
$dwlurl = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$ohmyposhversion/themes/agnoster.omp.json"
$themeFilePath = join-path -path $ohmyposhthemepath -childpath "agnoster.omp.json"
# https://github.com/shayne/go-wsl2-host is needed for this
# a powershell command to setup the wslhost after you started the first wsl shell after a pc startup
# this will help you update the hosts file with the wsl's ip address
# it's kind of a workaround for a situation where you don't want to run wsl2-host app as a service
function setup-wslhost {
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
if ($myWindowsPrincipal.IsInRole($adminRole))
@pushrbx
pushrbx / vagrant.py
Created November 13, 2025 14:27
Ansible inventory plugin for vagrant
DOCUMENTATION = r"""
name: vagrant
extends_documentation_fragment:
- constructed
short_description: Vagrant inventory source
author:
- pushrbx <contact@pushrbx.net>
description:
- Get inventory hosts from Vagrant.
options: