Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Install node and npm via nvm - https://github.com/creationix/nvm
# Run this script like - bash script-name.sh
# Prevent source
[[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo -e "\e[91m This script is being sourced, will exit now \e[39m" && return
# Script will auto terminate on errors
set -e
@baseboxorg
baseboxorg / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created March 13, 2018 05:08 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@baseboxorg
baseboxorg / Dockerfile
Created March 13, 2018 04:58 — forked from alext234/Dockerfile
A simple ubuntu container with gcc and cmake
FROM ubuntu:xenial
MAINTAINER alex
# update and install dependencies
RUN apt-get update \
&& apt-get install -y \
software-properties-common \
wget \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get update \
@baseboxorg
baseboxorg / docker_kill.sh
Created December 12, 2017 10:54 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@baseboxorg
baseboxorg / osx-setup.sh
Created September 29, 2017 10:30 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@baseboxorg
baseboxorg / init.sh
Created September 28, 2017 13:17 — forked from taoalpha/init.sh
osx initial script
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `init.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# Step 1: Update the OS and Install Xcode Tools #
@baseboxorg
baseboxorg / initMac.sh
Created September 28, 2017 08:47 — forked from florianrusch/initMac.sh
Init Mac file
#/bin/sh
#
# Reasonably sets OS X defaults. My sources:
# - https://ss64.com/osx/syntax-defaults.html
# - https://github.com/nicksp/dotfiles/blob/master/osx/set-defaults.sh
# - https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#
@baseboxorg
baseboxorg / macos-defaults.sh
Created September 28, 2017 08:44 — forked from BasilArackal/macos-defaults.sh
Basil Arackal's MacOS Defaults script
#!/usr/bin/env bash
#Basil Arackal's MacOS Defaults script
# This script is derived from @mathiasbynens
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@baseboxorg
baseboxorg / macos_setup.sh
Created September 28, 2017 08:44 — forked from jubecker/macos_setup.sh
macOS setup ad tuning
#!/usr/bin/env bash
# adaptation of https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
@baseboxorg
baseboxorg / macOS_rEFInd_guide.md
Created September 28, 2017 08:44 — forked from rowanphipps/macOS_rEFInd_guide.md
A guide to using rEFInd on macOS

A Guide to Multibooting a Mac

Disclaimer: This has the potential to destroy all the data on your drive. Make sure you have adequate (and verified working) backups before you proceed. You have been warned!

That being said this should leave all of your data untouched.

Background:

I have a mid-2012 15” non-Retina Mac book pro with a 1TB hard drive. I decided that I wanted to make my system faster by replacing the hard drive with an ssd and while I was at it I decided I also wanted to have Windows and Ubuntu partitions. Doing it this way meant that I had no data on the SSD while I experimented with partitions and boot managers although everything I did should be possible on a drive with an existing system.

Goals:

  • Multiple OSs installed with the ability to add more