Skip to content

Instantly share code, notes, and snippets.

View aluevano's full-sized avatar
:octocat:
Delighting customers through Cloud and Digital Transformation

Antonio Luevano aluevano

:octocat:
Delighting customers through Cloud and Digital Transformation
View GitHub Profile
@aluevano
aluevano / led_control.md
Created May 2, 2025 15:45 — forked from ffalt/led_control.md
Lincstation LED commands (tested on TrueNAS Scale 24.10)

Warning

i2cset commands with wrong parameters can damage your system. Handle with care!

The bus number may change after a restart, don't hardcode it into your scripts.

Before you use any commands on this page you MUST find out the bus number for the led control on your system

Run

i2cdetect -y 0
@aluevano
aluevano / vscode_addins.txt
Created February 27, 2024 17:34
vscode add ins
code --install-extension adrianwilczynski.asp-net-core-switcher
code --install-extension adrianwilczynski.csharp-to-typescript
code --install-extension adrianwilczynski.user-secrets
code --install-extension aliasadidev.nugetpackagemanagergui
code --install-extension andrewbutson.vscode-openai
code --install-extension andrewzhang.scribeai
code --install-extension argutec.argutec-azure-repos
code --install-extension azapi-vscode.azapi
code --install-extension azure-automation.vscode-azureautomation
code --install-extension azureadb2ctools.aadb2c
@aluevano
aluevano / inhibit_esm_ubuntu.sh
Created December 28, 2023 17:21
Inhibit ESM Messages ubuntu
sudo sed -Ezi.orig \
-e 's/(def _output_esm_service_status.outstream, have_esm_service, service_type.:\n)/\1 return\n/' \
-e 's/(def _output_esm_package_alert.*?\n.*?\n.:\n)/\1 return\n/' \
/usr/lib/update-notifier/apt_check.py
sudo /usr/lib/update-notifier/update-motd-updates-available --force
@aluevano
aluevano / get_latest_release.sh
Created March 10, 2023 19:12 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@aluevano
aluevano / export_vscode_extensions.md
Created September 27, 2022 23:55
How to Export your VS Code Extensions

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
@aluevano
aluevano / .bash_profile
Created September 26, 2022 21:30
Setup for Git Bash -- Customized shell
# Source the ~/.bashrc file if it exists
if [ -f ~/.bashrc ]
then
. ~/.bashrc
fi
@aluevano
aluevano / delete_git_history.sh
Created July 14, 2022 05:57
Delete all activity and history of a Git Repo
#!/bin/bash
default_branch=`basename $(git symbolic-ref --short refs/remotes/origin/HEAD)`
git checkout --orphan tmp
git add -A # Add all files and commit them
git commit
git branch -D $default_branch # Deletes the default branch
git branch -m $default_branch # Rename the current branch to default
git push -f origin $default_branch # Force push default branch to github
@aluevano
aluevano / surface-reset-monitor.md
Created June 4, 2022 16:32
How to fix SurfaceBook multimonitor refresh issue

How to fix the SurfaceBook multimonitor refresh issue when attached to the Surface Dock

I have found a solution for my problem but I had to delete three registry keys.

Warning! This solution worked for me and I do not guarantee it will work for you.\

I am not responsible if anything happens to your PC.

Steps

@aluevano
aluevano / Convert-WindowsImage.ps1
Last active May 16, 2022 07:46
Create a mountable VHDX for Windows 10 (Booting)
Function
Convert-WindowsImage
{
<#
.NOTES
Copyright (c) Genvio Inc. All rights reserved.
Use of this sample source code is subject to the terms of the Genvio Inc.
license agreement under which you licensed this sample source code. If
{
"clientId": "urn:federation:MicrosoftOnline",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"https://login.microsoftonline.com/login.srf"
],
"webOrigins": [