We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| #!/usr/bin/env bash | |
| softwareupdate -l | |
| while true; do | |
| echo "Do you wish to update all the above things?" | |
| read -p "[y/n]? " yn | |
| case $yn in | |
| [Yy]* ) softwareupdate -i -a; break;; | |
| [Nn]* ) exit;; |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| #!/bin/bash -e | |
| # Inspired by: https://github.com/adrienthebo/git-tools/blob/master/git-truncate | |
| if [[ (-z $1) || (-z $2) ]]; then | |
| echo "Usage: $(basename "$0") DROP_AT_SHA1 BRANCH" | |
| exit 1 | |
| fi | |
| if [[ ! $1 =~ ^[0-9a-f]{7,40}$ ]]; then | |
| echo "Error: invalid Git commit SHA1" >&2 |
| function countCSSRules() { | |
| var results = '', | |
| log = ''; | |
| if (!document.styleSheets) { | |
| return; | |
| } | |
| for (var i = 0; i < document.styleSheets.length; i++) { | |
| countSheet(document.styleSheets[i]); | |
| } | |
| function countSheet(sheet) { |