Skip to content

Instantly share code, notes, and snippets.

View GerardoHP's full-sized avatar

Gerardo de Jesús Hernández Perales GerardoHP

View GitHub Profile
@GerardoHP
GerardoHP / .gitconfig
Last active July 3, 2023 19:35
common git aliases
[core]
editor = code --new-window --wait
[alias]
egc = config --global --edit
elc = config --local --edit
esc = config --system --edit
st = status
ss = st --short
co = checkout
sw = switch
@GerardoHP
GerardoHP / mkExercise
Created March 28, 2023 19:47
bash script to create basic files template for new exercises in go, should be created under /usr/local/bin
#!/bin/sh
# Find the module file of go
if find go.mod
then
# Change to the structure
if cd $1
then
echo "package $1" >> "$2.go"
echo "package $1_test" >> "$2_test.go"
@GerardoHP
GerardoHP / goland
Created March 28, 2023 19:44
execute Rider app with an optional argument to open a folder, should be created under /usr/local/bin
#!/bin/sh
open -na Goland.app --args "$@"
@GerardoHP
GerardoHP / rider
Created March 28, 2023 19:43
execute Rider app with an optional argument to open a folder, should be created under /usr/local/bin
#!/bin/sh
open -na Rider.app --args "$@"
@GerardoHP
GerardoHP / golang.gitignore
Created July 11, 2022 15:23
.gitignore for golang
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

Keybase proof

I hereby claim:

  • I am GerardoHP on github.
  • I am gerardohp (https://keybase.io/gerardohp) on keybase.
  • I have a public key whose fingerprint is 279A 4656 94D5 470F 8C21 4A89 859E 9867 714F 3316

To claim this, I am signing this object:

@GerardoHP
GerardoHP / clean_branches.sh
Created November 7, 2021 16:48
SH to delete all of the branches excluding some
cd /c/Users/ghern/source/repos/bn3/bn3-backend-${1}
current_branch=$(git branch --show-current)
branches_to_delete=$(git branch -l | grep -v "dev" | grep -v "release/1.0.0" | grep -v $current_branch)
for branch in $branches_to_delete; do
git branch -D ${branch}
done
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@GerardoHP
GerardoHP / ohmyposhv3-v2.json
Last active November 7, 2021 16:46 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,