Skip to content

Instantly share code, notes, and snippets.

View robertlluberes's full-sized avatar
🎯
Focusing

Robert Lluberes robertlluberes

🎯
Focusing
View GitHub Profile
@robertlluberes
robertlluberes / vivian-guillen-como-ser-un-freelancer-profesional-notas.md
Created October 18, 2025 05:15
Resumen y apuntes personales de la charla de Vivian Guillén sobre cómo profesionalizar tu carrera como freelancer.
@robertlluberes
robertlluberes / pull_request_template.md
Created December 13, 2024 21:21
Template for documenting pull requests (PRs) with a structured approach. This template includes sections for summarizing changes, detailing modifications, explaining their impact, providing testing instructions, and outlining deployment steps. Ideal for maintaining clear communication and consistency in team workflows.

Summary:

Give a brief overview of the pull request. Explain the enhancements or changes being introduced and why they are needed. This should be a high-level summary that can be understood by anyone on the team.

Changes:

In this section, list out the changes made to each project. Describe what files or features were updated and why. Give a brief description of the changes made and why they were necessary.

Impact:

@robertlluberes
robertlluberes / AddLinkedServer.md
Created September 10, 2019 17:21
T-SQL script to create a Linked Server (with local logins) using a different Data Source than the Server Name

T-SQL script to create a Linked Server (with local logins) using a different Data Source than the Server Name

DECLARE @LinkedServerName sysname = 'LinkedServerName', @LinkedServerDatasource sysname = 'LinkedServerDatasource'

-- Creates a linked server.
EXECUTE [master].[sys].[sp_addlinkedserver] @server = @LinkedServerName, @srvproduct = 'SQL Server'

-- Creates or updates a mapping between a login on the local instance of SQL Server and a security account on a remote server.
EXECUTE [master].[sys].[sp_addlinkedsrvlogin] @rmtsrvname = @LinkedServerName, @useself = 'True'
@robertlluberes
robertlluberes / ConfigureP4MergenInGit.bat
Last active April 25, 2022 02:41
Configure P4Merge as Merge and Diff Tools in git
REM Helix Merge and Diff Tools (P4Merge)
REM Check the p4merge.exe path before run the script
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
REM git config --global mergetool.p4merge.cmd 'p4merge $BASE $LOCAL $REMOTE $MERGED'
git config --global diff.tool p4merge
git config --global difftool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
@robertlluberes
robertlluberes / RemoveLocalBranchesThatHaveGoneRemotes
Last active January 16, 2024 19:10
Script for git that remove local branches that have gone remotes
# Script that remove local branches that have gone remotes
# Source: https://stackoverflow.com/a/33548037/11034068
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
# Make sure to use this script with caution, as it will permanently delete local branches.
# Be certain that you no longer need these branches before running the script.
# Always ensure that your local changes are committed or backed up before running this script to avoid any accidental data loss.
# This script is a helpful utility for maintaining a clean and up-to-date local Git repository by removing branches that are no longer relevant due to changes on the remote repository.
@robertlluberes
robertlluberes / GetSavedWifiPasswordProfileThroughCmd.bat
Last active August 2, 2022 18:08
Get the password of a saved WiFi Profile through the command prompt (cmd). useful when you don’t have access to the Security tab for the property of a WiFi network adapter, but still have access to the cmd . ¯\_(ツ)_/¯
REM download this file, run it and type the WiFi Profile name from you want to see the saved password
REM otherwise run the command "netsh wlan show profile "PROFILE_NAME" key=clear" changing PROFILE_NAME for yours
REM and look for the value of "Key Content" under the "Security settings" section
@echo off
set /p profileName="Enter the WiFi Profile Name: "
for /F "delims= skip=32" %%G IN ('"netsh wlan show profile "%profileName%" key=clear"') DO @echo %%G | find /i "Key Content"
@robertlluberes
robertlluberes / AssignPermissionsFileOrDirectoryThroughCmd.bat
Created December 21, 2018 19:31
Assign permissions to a file or directory through the command prompt (CMD) useful when you don’t have access to the Security tab in the property windows of a directory or file, but still have permissions to assign permissions in Windows. ¯\_(ツ)_/¯
REM /grant - grants the specified user access rights.
REM (CI) - container inherit
REM (OI) - object inherit
REM F - full access
REM icacls "Here your file or directory" - List the actual permmissions to a Fle or Directory
icacls "Here your Path to a Directory or File" /grant "Here username or Group":(CI)(OI)(F)
@robertlluberes
robertlluberes / StringInterpolationCsharpConditionalOperators.cs
Created December 16, 2018 21:06
Conditional Operatos in a String Interpolation in Csharp
string name = "Bill";
var birthday = new DateTime(1955, 10, 28);
var age = DateTime.Now.Year - birthday.Year;
// Using the ternary conditional operator ?: in an interpolated expression
Console.Write($"Hello, {name}! you {((age > 21) ? "are" : "are not")} an adult!");
Console.WriteLine($" and the year {birthday.Year} {(DateTime.IsLeapYear(birthday.Year) ? " is " : " is not ")} a leap year.");
// Result:
@robertlluberes
robertlluberes / StringInterpolationCsharpFormatting.cs
Created December 16, 2018 21:04
Formatting a value in a String Interpolation in Csharp
string name = "Bill";
var birthday = new DateTime(1955, 10, 28);
// Formatting dates with string interpolation
Console.WriteLine($"Hello, {name}! you born on {birthday:dd/MMMM/yyyy}");
// Formatting decimals with string interpolation
Console.WriteLine($"The PI number is {Math.PI:N3}");
// Result:
@robertlluberes
robertlluberes / StringInterpolationCsharpSpecialCharatersCurlyBraces.cs
Created December 16, 2018 21:02
Showing curly braces in a String Interpolation in Csharp
var numbers = "1, 2, 3";
// Escaping curly braces using double curly braces "{{" o "}}"
Console.WriteLine($"{{{numbers}}}");
// Result:
// {1, 2, 3}