Skip to content

Instantly share code, notes, and snippets.

jcharlier

Block or report user

Report or block jcharlier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jcharlier
jcharlier / createSwap.sh
Created Mar 27, 2018
Create Swapfile in Ubuntu
View createSwap.sh
#!/bin/bash
regex='^[0-9]+([.][0-9]+)?$'
if [[ ! $2 =~ $regex ]]; then
echo "Usage: createSwap.sh fullPathToSwapFile swapFileSizeinGB";
echo "ex: createSwap /tmp/swapfile.swap 8"
exit 1
fi
if [[ -d $1 ]] || [[ -f $1 ]] || [[ ! $1 = /* ]]; then
echo "please supply the full path to a new swapFile"
exit 1
@jcharlier
jcharlier / gen-apple-merchant-cert.sh
Created Mar 22, 2018
Apple Pay Merchant Certificate process
View gen-apple-merchant-cert.sh
#!/bin/bash
dir="apple-certificates-data"
if [ -d $dir ]; then
echo "**Este script sobrescreve os dados que estão no diretorio '$dir'!**"
read -r -p "Continuar? [y/N] " start
start=${start,,} # tolower
if [[ ! "$start" =~ ^(yes|y)$ ]]; then
exit 0
fi
fi
@jcharlier
jcharlier / postman-update.sh
Last active Sep 13, 2018
*DEPRECATED* - postman has a auto-update (https://app.getpostman.com/app/download/linux64) Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
View postman-update.sh
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
You can’t perform that action at this time.