This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias @alias='nano ~/.bash_aliases && source ~/.bash_aliases' | |
| alias @wget='wget --no-check-certificate -c -P ~/Transferências/' | |
| alias @aria2c='aria2c --check-certificate=false -x5 -d ~/Transferências/' | |
| alias @somealias='ssh -i ~/.ssh/my_ssh_key -L 3306:127.0.0.1:3306 debian@myremoteip' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| for f in /etc/apt/sources.list.d/*.list; do | |
| grep -Po "(?<=^deb\s).*?(?=#|$)" "$f" | while read -r ENTRY ; do | |
| echo "ENTRY: $ENTRY" | |
| HOST=$(cut -d/ -f3 <<< "$ENTRY") | |
| if [ "ppa.launchpad.net" = "$HOST" ]; then | |
| USER=$(cut -d/ -f4 <<< "$ENTRY") | |
| PPA=$(cut -d/ -f5 <<< "$ENTRY") | |
| packageCount=$(awk '$1=="Package:" {if (a[$2]++ == 0) {system("dpkg -l "$2)}}' /var/lib/apt/lists/*"$USER"*"$PPA"*Packages 2>/dev/null | awk '/^ii/' | wc -l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| usage(){ | |
| echo "Usage: $0 username" | |
| exit 1 | |
| } | |
| restore(){ | |
| getent passwd $1 | |
| if [ $? -eq 0 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "removing evaluation key" | |
| rm ~/.IntelliJIdea*/config/eval/*.evaluation.key | |
| echo "resetting evalsprt in options.xml" | |
| sed -i '/evlsprt/d' ~/.IntelliJIdea*/config/options/options.xml | |
| echo "resetting evalsprt in prefs.xml" | |
| sed -i '/evlsprt/d' ~/.java/.userPrefs/prefs.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this script uses syntax for bitbucket server. | |
| # For bitbucket cloud see https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724129.html | |
| # | |
| # Note: replace your_server_url, your_username with your values | |
| SERVER=your_server_url | |
| USERNAME=your_username | |
| echo "Whats your password?" | |
| read -s PASSWORD | |
| # https://stackoverflow.com/questions/46923816/how-to-retrieve-the-list-of-repos-using-a-particular-plugin-using-bitbucket-api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scp -r /path/to/local/source [email protected]:/path/to/remote/destination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scp -r [email protected]:/path/to/remote/source /path/to/local/destination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Script generated by the Inno Setup Script Wizard. | |
| ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | |
| #define MyAppName "Smartdigit sage api configurator" | |
| #define MyAppVersion "1.0.2.3-2017.02.005" | |
| #define MyAppPublisher "SmartDigit – Unipessoal, Lda" | |
| #define MyAppURL "http://smartdigit.pt" | |
| #define MyAppExeName "Api.Sage.Configurator.exe" | |
| [Setup] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| bucket=$1 | |
| set -e | |
| echo "Removing all versions from $bucket" | |
| versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
| markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |