Skip to content

Instantly share code, notes, and snippets.

@mmollick
mmollick / setup.sh
Created March 2, 2017 18:39 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
<?php
/**
* Shorten large numbers into abbreviations (i.e. 15,000 = 15K, 1,500 = 1.5K)
*
* @param int $number Number to shorten
* @return String A number with a symbol
*/
function numberAbbreviation($number) {
$abbrevs = array(12 => "T", 9 => "B", 6 => "M", 3 => "K", 0 => "");