Skip to content

Instantly share code, notes, and snippets.

View anibalardid's full-sized avatar
🏠
Working from home

Anibal anibalardid

🏠
Working from home
View GitHub Profile
@anibalardid
anibalardid / git-rm-repository-history.txt
Created November 15, 2021 13:34
git rm file and folders from history repository
https://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository
@anibalardid
anibalardid / ubuntu-disable-energy-power-sleep-session.txt
Created October 18, 2021 21:19
disable my system from going to sleep
https://askubuntu.com/questions/47311/how-do-i-disable-my-system-from-going-to-sleep
@anibalardid
anibalardid / disable-calendar-gnome-notification-reminder.txt
Created September 30, 2021 12:53
disable gnome calendar notifications popup
Try copying /etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop
to ~/.config/autostart/ and then add Hidden=true to that file.
Then restart your session and check if evolution-alarm-notify is still running.
@anibalardid
anibalardid / starttmux.sh
Last active June 23, 2021 01:48 — forked from todgru/starttmux.sh
Start up tmux with custom windows, panes and applications running #tmux #linux
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
# Another examples: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened#answer-40009032
#
@anibalardid
anibalardid / remember-git-https-credentials.md
Last active June 19, 2021 00:25
remember git https credentials/password #git

When you use https in git clone, you need to enter password in each git command.
To avoid that you need to do these steps:

  1. cd repodir
  2. git config credential.helper store
  3. git pull
  4. #enter password
  5. ready
@anibalardid
anibalardid / migrate-git-repo.md
Last active June 19, 2021 00:25
Migrate from one git to another git repo #git

Migrar código de git de un repositorio a otro

Ejemplo para Migrar de bitbucket a github

git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
@anibalardid
anibalardid / hunter.sh
Last active June 2, 2021 01:28 — forked from jhaddix/Github bash generated search links (from hunter.sh)
Github bash generated search links (from hunter.sh) #hack #security #bounty #linux
#!/bin/bash
# Use: ./hunter.sh domain.tld
echo ""
echo "************ Github Dork Links (must be logged in) *******************"
echo ""
echo " password"
echo "https://github.com/search?q=%22$1%22+password&type=Code"
echo "https://github.com/search?q=%22$without_suffix%22+password&type=Code"
echo ""
@anibalardid
anibalardid / extractPorts.sh
Created May 18, 2021 01:02
Extract ports from nmap output #hack #security #s4vitar
# Used:
# nmap -p- --open -T5 -v -n ip -oG allPorts
# Extract nmap information
# Run as:
# extractPorts allPorts
function extractPorts(){
ports="$(cat $1 | grep -oP '\d{1,5}/open' | awk '{print $1}' FS='/' | xargs | tr ' ' ',')"
ip_address="$(cat $1 | grep -oP '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' | sort -u | head -n 1)"
echo -e "\n[*] Extracting information...\n" > extractPorts.tmp
@anibalardid
anibalardid / golang-install-path.md
Created May 10, 2021 18:28
go golang install paths

add to . bashrc / .zshrc

export GOPATH="$HOME/go_projects"
export GOBIN="$GOPATH/bin"

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin