Skip to content

Instantly share code, notes, and snippets.

View renanmpimentel's full-sized avatar

Renan Martins Pimentel renanmpimentel

View GitHub Profile
@tlongren
tlongren / tinify.sh
Created September 28, 2017 15:18
Bash script to tinify images in a folder using the TinyPNG API
#!/bin/bash
TINYAPIKEY="YOUR_API_KEY"
# Make sure source dir is supplied
if [ -z "$1" ]
then
echo "Missing argument. Supply the source directory containing the images to be optimized. Usage: ./tiny.sh <source_dir>"
exit 1
fi
@olivertappin
olivertappin / update-phpstorm.sh
Created July 20, 2017 07:58
Download and install the latest version of PhpStorm for Ubunti
#!/bin/bash
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
echo "Downloading the latest PhpStorm to /tmp"
cd /tmp
@furdarius
furdarius / update-phpstorm.sh
Last active August 3, 2018 04:50
Update EAP PhpStorm
#!/bin/bash -e
# IMPORTANT. Phpstom installation exists on /opt/phpstorm.
# IMPORTANT. Run with sudo!
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
echo -n "Please enter the PhpStorm download url (eg http://download.jetbrains.com/webide/PhpStorm-EAP-141.690.tar.gz): "
read url
# Download file from url
echo "Downloading PhpStorm to ~/Downloads"
@rafaelrosafu
rafaelrosafu / 01_podcasts_august_2015.md
Last active October 10, 2018 19:02
Podcast list as of August 11th 2014. Just to be clear, most podcasts on this list don't have new episodes every week, some are almost gone.
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r