Skip to content

Instantly share code, notes, and snippets.

@DarrenN
DarrenN / get-npm-package-version
Last active April 17, 2024 16:57 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@ktheory
ktheory / check_aws_status.rb
Created January 13, 2012 05:11
Nagios plugin to check AWS Status RSS feeds
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'net/http'
# check_aws_status.rb
# A nagios plugin for fetching RSS feeds from http://status.aws.amazon.com.
# Source: https://gist.github.com/1604786
# Written by Aaron Suggs: https://github.com/ktheory