Skip to content

Instantly share code, notes, and snippets.

@nrollr
nrollr / Ruby_and_Rails.md
Last active March 28, 2018 17:57
Ruby and Rails on El Capitan

#Install Ruby and Rails on El Capitan The following procedure was used to install the required components on El Capitan (clean install)

First make sure Xcode Command Line Tools are installed.
Open Terminal and enter: xcode-select --install you will be prompted to start the installation. Once finished proceed..

##Install Homebrew Important Notice: Homebrew and El Capitan, make sure to read the article!

  • Enter the following command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@nrollr
nrollr / Screenshots.sh
Last active October 3, 2015 19:35
Change the file location of screencaptures on OS X
#!/bin/bash
defaults write com.apple.screencapture location ~/Screenshots
killall SystemUIServer
@nrollr
nrollr / MongoDB.md
Last active January 7, 2024 11:57
Install MongoDB on El Capitan

Install MongoDB on El Capitan

How to install the latest stable version of MongoDB on OS X 10.11 (El Capitan).

  • Official MongoDB install documentation: Here
  • Current Stable Release: 3.0.6

Make sure you have Homebrew installed before following the different steps documented below.
Important notice: When installing Homebrew on El Capitan there is an important article you should read first: Homebrew and El Capitan

@nrollr
nrollr / Homebrew.sh
Created October 10, 2015 15:44
List of Homebrew commands
#!/bin/bash
brew update # Ensure you’re running the latest version of Homebrew, including latest list of formulae
brew list # Show everything installed with Homebrew
brew outdated # Show Homebrew installed packages which could be updated
brew upgrade # Update all packages installed by Homebrew
brew upgrade [package] # Update an specific package installed by Homebrew
brew pin [package] # Protect a package, prevents installing upgrades
@nrollr
nrollr / MySQL.md
Last active October 28, 2020 02:53
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

@nrollr
nrollr / BulkRename.applescript
Last active December 9, 2021 14:33
Bulk rename files with csv file
-- Store the .csv file in the same directory as the files you wish to rename
-- Replace 'username' in the path with your own (lines 3 & 10)
set csvFile to "/Users/username/Documents/index.csv"
set csvList to paragraphs of (read csvFile)
set {theID, my text item delimiters} to {my text item delimiters, ","}
repeat with csvLines in csvList
set {oldName, newName} to text items of csvLines
tell application "System Events"
set name of file oldName of folder "/Users/username/Documents/" to newName
@nrollr
nrollr / HTTPCheckStatus.applescript
Created November 29, 2015 11:33
Script to validate list or URL's based on the HTTP status code
-- Replace 'username' in the path with your own (lines 2 & 3)
set inputFile to "/Users/username/Documents/ListURL.txt"
set outputFile to "/Users/username/Documents/StatusURL.txt"
set txtList to paragraphs of (read inputFile)
set {TID, my text item delimiters} to {my text item delimiters, ";"}
repeat with txtLines in txtList
set {theURL} to text items of txtLines
set theScript to "curl -o /dev/null -s -I -w '%{http_code}' " & theURL
@nrollr
nrollr / ElCapitan.applescript
Last active July 25, 2016 13:32
Performance improvements for El Capitan
-- Disable Time Machine Local Backups
sudo tmutil disablelocal
-- Disable Automatic Spell Checker
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
-- Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
-- Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
-- Accelerated playback when adjusting the window size (Cocoa applications).
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active November 13, 2024 10:41
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@nrollr
nrollr / SSHKeys.sh
Last active October 2, 2019 06:46
Generate SSH keys
#!/bin/bash/
ls -al ~/.ssh # Lists existing files in your .ssh directory
ssh-keygen -t rsa -b 4096 -C "[email protected]" # Creates new ssh key, using the provided email as label
eval "$(ssh-agent -s)" # Ensure ssh-agent is enabled
ssh-add ~/.ssh/id_rsa # Add ssh key to the ssh-agent