Skip to content

Instantly share code, notes, and snippets.

View maxrimue's full-sized avatar

Max Rittmüller maxrimue

View GitHub Profile
@maxrimue
maxrimue / semver.sh
Created July 24, 2015 15:36
Compare semantic versions in pure bash
#!/bin/bash
# Assume we have two semantic versions that we want to compare:
version1=0.12.0
version2=1.15.5
# First, we replace the dots by blank spaces, like this:
version1=${version1//./ }
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done