Skip to content

Instantly share code, notes, and snippets.

View igotinfected's full-sized avatar

Jason Rebelo igotinfected

View GitHub Profile
@using System.Threading
@typeparam TKey
@typeparam T
<div>
<MudAutocomplete @ref="_autocomplete"
T="T"
@bind-Value="_currentValue"
@bind-Value:after="@AddValueAsync"
@igotinfected
igotinfected / bootstrap-dotfiles.fish
Last active December 14, 2022 21:25
Bootstrap dotfiles via a fish script. This script clones and bootstraps my dotfiles repo.
#!/usr/bin/env fish
# retrieve dotfiles
echo "==> ⬇️ downloading dotfiles..."
git clone --bare https://github.com/igotinfected/dotfiles $HOME/.dotfiles
# force restore dotfiles (i.e. overwrite tracked files if they already exist)
echo "==> ⚙️ setting up dotfiles..."
git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" checkout -f
@igotinfected
igotinfected / setup-ubuntu-wsl2.ps1
Last active December 13, 2022 16:45
Setup WSL2 & lauch Ubuntu distro install
# based on https://github.com/Alex-D/dotfiles#setup-wsl-2
# run as admin in pwsh
# enable wsl + required features
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# download & install kernel update
$wslUpdateInstallerUrl = "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi"
$downloadFolderPath = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path
@igotinfected
igotinfected / bootstrap-linux.sh
Last active December 14, 2022 21:25
Bootstrap Linux/WSL2 or MacOS install
#!/usr/bin/env bash
# detect OS (based on https://github.com/microsoft/WSL/issues/4071#issuecomment-1223393940)
echo "==> 🔍 determining OS..."
unameOut=$(uname -a)
case "${unameOut}" in
*Microsoft*) OS="WSL";;
*microsoft*) OS="WSL2";;
Linux*) OS="Linux";;
Darwin*) OS="Mac";;
@igotinfected
igotinfected / install-nerd-font.sh
Last active December 13, 2022 16:45
Install FiraCode Nerd Font on Linux
#!/usr/bin/env bash
# ensure fontconfig pkg is installed
echo "==> 📦 ensuring fontconfig package is installed..."
(dpkg-query -s fontconfig 2>/dev/null | grep -c "ok installed") || sudo apt install fontconfig -y
# TODO: allow passing font URL as argument
# download the font
echo "==> ⬇️ downloading the font..."
wget "https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Regular/complete/Fira%20Code%20Regular%20Nerd%20Font%20Complete%20Mono.ttf"
@igotinfected
igotinfected / rollback_aab.sh
Created August 19, 2021 13:55 — forked from Farious/rollback_aab.sh
Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab. This enables us to re-submit a previously submited aab to the play store, doing a rollback to the given version.
#!/bin/sh
#
# Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab.
# Run this script with: sh rollback.sh your_project.aab android_signing_key.key key_alias key_pwd version_code version_name
#
# Necessary setup:
#
# jarsigner - This binary should exist in the path
#
# Configuration.proto and Resources.proto can be found in aapt2's github