Skip to content

Instantly share code, notes, and snippets.

@ChristopherA
Last active August 29, 2015 14:06
Show Gist options
  • Save ChristopherA/82f4291405377a284d7c to your computer and use it in GitHub Desktop.
Save ChristopherA/82f4291405377a284d7c to your computer and use it in GitHub Desktop.
Random links and notes regarding install of development tools on the Mac

==== SSH keygen for github

https://help.github.com/articles/generating-ssh-keys#platform-mac

http://software.clapper.org/cheat-sheets/mac-os-x.html https://github.com/hjuutilainen/dotfiles/blob/master/bin/osx-user-defaults.sh

gib: fast access to .gitignore boilerplates https://github.com/simonwhitaker/gibo

brew install gibo brew upgrade gibo

=== https://gist.github.com/zenorocha/7159780

=== https://gist.githubusercontent.com/zenorocha/7159780/raw/9b9413ff1306d78be6447f4beddcf90e7e8b2b8a/softwares.sh

#!/bin/sh

homebrew-cask

brew tap phinze/homebrew-cask brew install brew-cask

browser

brew cask install firefox-aurora brew cask install google-chrome brew cask install google-chrome-canary brew cask install opera-next

development

brew cask install sublime-text-3 brew cask install filezilla brew cask install kaleidoscope brew cask install iterm2 brew cask install source-tree brew cask install virtualbox

other

brew cask install alfred brew cask install dropbox brew cask install mou brew cask install skype brew cask install spotify brew cask install u-torrent

===

sublime text 2: http://www.sublimetext.com/2

vim

===

Interesting github users: https://github.com/nprapps

Show Keychain status in menu bar

====

https://agilebits.com/onepassword http://www.irradiatedsoftware.com/sizeup/ http://gitx.laullon.com/ http://getcloudapp.com/

===

curl -L https://get.rvm.io | bash -s stable rvm install 2.0.0 rvm default 2.0.0

====

git config --global color.ui true git config --global user.name "YOUR NAME" git config --global user.email "YOUR@EMAIL.com" ssh-keygen -t rsa -C "YOUR@EMAIL.com" The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command and paste it here.

cat ~/.ssh/id_rsa.pub Once you've done this, you can check and see if it worked:

ssh -T git@github.com You should get a message like this:

Hi excid3! You've successfully authenticated, but GitHub does not provide shell access.

===

https://help.github.com/articles/generating-ssh-keys#platform-mac

ls -al ~/.ssh

Lists the files in your .ssh directory, if they exist

ssh-keygen -t rsa -C “ChristopherA@Hackathon.net

Creates a new ssh key, using the provided email as a label

start the ssh-agent in the background

eval "$(ssh-agent -s)"

Agent pid 59566

ssh-add ~/.ssh/id_rsa

===

Common problems are addressed at: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ https://cs.okstate.edu/~hussach/blog/index.php/p/id/15

More tips at: http://hackercodex.com/guide/mac-osx-mavericks-10.9-configuration/ https://gorails.com/setup/osx/10.9-mavericks http://hackercodex.com/guide/python-development-environment-on-mac-osx/ http://www.macminivault.com/mysql-mavericks/ http://coolestguidesontheplanet.com/installing-node-js-osx-10-9-mavericks/ http://stackoverflow.com/questions/19533528/installing-java-on-os-x-10-9-mavericks http://mactips.dwhoard.com/new-mac-checklist http://computers.tutsplus.com/tutorials/40-terminal-tips-and-tricks-you-never-thought-you-needed--mac-51192

===

gcc --version

===

===

Setting env variables for non-shell apps

http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x/5444960#5444960

===

Uninstall Homebrew

https://gist.githubusercontent.com/mxcl/1173223/raw/a833ba44e7be8428d877e58640720ff43c59dbad/uninstall_homebrew.sh

===

How to create bootable backups (old) http://static.afp548.com/mactips/image.html

=== remove doc icons http://wiki.afp548.com/index.php/Remove_Dock_Icons

=== login & logout scripts http://wiki.afp548.com/index.php/Login/Logout_Hooks_in_OS_X

=== Mac app packaging http://wiki.afp548.com/index.php/Guidelines_for_Mac_software_packaging

===

theme default terminal prompt http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/

=== open monospace font with italics http://www.marksimonson.com/fonts/view/anonymous-pro

===

more advice, with some yosemite tips: https://github.com/nicolashery/mac-dev-setup

=== ssd/hd setup advice http://mattgemmell.com/using-os-x-with-an-ssd-plus-hdd-setup/

=== update a new installation without creating a user http://hints.macworld.com/article.php?story=2014071314080450

=== Private git repositories using gittolite on mac http://jamesreubenknowles.com/installing-gitolite-on-a-mac-1551 http://www.themacosxserveradmin.com/2012/04/git-server-on-os-x-lion.html http://hints.macworld.com/article.php?story=20140515080411279 http://conedogers.wordpress.com/2012/03/26/gitolite-on-os-x/

=== top level structure http://mac-dev-env.patrickbougie.com/started-folders/ http://hiltmon.com/blog/2013/07/03/a-simple-c-plus-plus-project-structure/

bin: The output executables go here, both for the app and for any tests and spikes. build: This folder contains all object files, and is removed on a clean. doc: Any notes, like my assembly notes and configuration files, are here. I decided to create the development and production config files in here instead of in a separate config folder as they “document” the configuration. include: All project header files. All necessary third-party header files that do not exist under /usr/local/include are also placed here. lib: Any libs that get compiled by the project, third party or any needed in development. Prior to deployment, third party libraries get moved to /usr/local/lib where they belong, leaving the project clean enough to compile on our Linux deployment servers. I really use this to test different library versions than the standard. spike: I often write smaller classes or files to test technologies or ideas, and keep them around for future reference. They go here, where they do not dilute the real application’s files, but can still be found later. src: The application and only the application’s source files. test: All test code files. You do write tests, no?

locate, case insesitive first 10 items

locate filename -i -l 10

index now with: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

which: finds in path

find /topdir -type f -name myfile -print

whereis: finds like which but more directories

whereis program

====

From: http://conra.dk/2013/01/18/git-on-osx.html

Prompt

Git also comes with a handy utility to add information about the current repository to your bash prompt. Having git status in the prompt provides a heads up display of whether the current directory is under version control or not, and can also provide basic information, like which branch is currently checked out. This feature can be easily set up, assuming you installed git and bash-completion with Homebrew, by adding the following to your ~/.bash_profile file:

source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh The __git_ps1 function is now available in your shell. You can then use it in your prompt like the example below, which adds the current branch to the default prompt in OS X:

Github Integration

It you happen to use Github for hosting your git repositories (and enhancing your git workflow), there is a convenient tool that can integrate some of Github’s functionality into your command line. The tool is called Hub https://github.com/github/hub . One feature it adds is short-hand notation for repositories, assuming that the repository is hosted on github. For example, it can shorten

git clone git://github.com/conradev/QuickQR.git to

git clone conradev/QuickQR In addition to short-hand, Hub also adds Github specific functionality to your command line, like the ability to open pull requests. If you are working on a topic branch, and want to open a pull request, you need only type

git pull-request and you can type up a pull request in your text editor. Installing hub is also a breeze. To install it with Homebrew, you can type

brew install hub This installs the ‘hub’ command to your PATH. It acts as an intermediary layer on top of git, meaning it uses git to execute the commands you enter, after preprocessing them a bit. To integrate hub seamlessly (as seen in the examples above), you can alias git to hub, by adding the following to your ~/.bash_profile:

eval "$(hub alias -s)"

PS1="\h:\W \u$(__git_ps1 " (%s) ")$"

Informative git prompt for bash and fish This prompt is a port of the "Informative git prompt for zsh" which you can find here

A bash prompt that displays information about the current git repository. In particular the branch name, difference with remote branch, number of files staged, changed, etc.

$ brew install bash-git-prompt ==> Downloading https://github.com/magicmonty/bash-git-prompt/archive/2.0.tar.gz ######################################################################## 100.0% ==> Caveats You should add the following to your .bashrc (or equivalent): source /usr/local/opt/bash-git-prompt/share/gitprompt.sh ==> Summary 🍺 /usr/local/Cellar/bash-git-prompt/2.0: 8 files, 44K, built in 2 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment