Skip to content

Instantly share code, notes, and snippets.

View jeffpignataro's full-sized avatar

Jeff Pignataro jeffpignataro

View GitHub Profile
@jeffpignataro
jeffpignataro / .bash_aliases
Last active July 16, 2023 15:35
Bash Aliases
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias apt-get='sudo apt-get'
alias bc='bc -l'
alias chmodx='chmod +x'
alias codesu='sudo code --user-data-dir jeffp2662'
alias cpuinfo='lscpu'
alias dcc='sudo docker container'
@echo off
IF NOT "%~1"=="" GOTO Processing
@echo Missing argument for release branch name (ex REL_3.2)
@echo Exiting
EXIT
:Processing
cd \Repos\CS
@echo Working...
@jeffpignataro
jeffpignataro / clone-all-repos.sh
Last active August 26, 2023 15:08
Clone all repos
# ORIGINAL
CNTX={users}; NAME={jeffpignataro}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
# Jq with Background Processes using GH CLI
CNTX={users}; NAME={jeffpignataro}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | jq ".[].name" | xargs -I % sh -c 'gh repo clone jeffpignataro/% &'
@jeffpignataro
jeffpignataro / .zshrc
Last active November 5, 2023 16:15
.zshrc Example
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/home/jeffp2662/.local/bin:/home/linuxbrew/.linuxbrew/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/jeffp2662/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@jeffpignataro
jeffpignataro / go-bazel.sh
Last active July 16, 2023 15:24
go-bazel
alias go-bazel="go mod tidy; bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies; bazel run //:gazelle; bazel build //..."
@jeffpignataro
jeffpignataro / gist:11c0c28f94ea1f397f80f32e3ee6b3fb
Created October 15, 2023 18:45
Bazel rule for ARM64 platform
export ARM64_PLATFORM='--platforms=@io_bazel_rules_go//go/toolchain:linux_amd64'