Last active
January 19, 2017 18:22
-
-
Save julienma/4559907 to your computer and use it in GitHub Desktop.
Collection of useful OSX commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Move a directory out of an existing repo, and push it to its own repo, keeping only relevant commits: | |
See http://teach.github.com/articles/lesson-filter-branch/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// turn any directory into your web server directory | |
$ python -m SimpleHTTPServer 8080 | |
// open Google Chrome with the flag to disable Same-Origin Policy (and allow for cross-domain requests) | |
$ open -a Google\ Chrome --args --disable-web-security | |
// keeping your dev environment updated -- http://railsapps.github.io/installing-rails.html | |
// 1. update Xcode components | |
// open Xcode > Preferences > Download > Make sure that "Command Line Tools" is installed | |
// 2. update homebrew package | |
$ brew update | |
$ brew doctor | |
// 3. update RVM | |
$ rvm get stable | |
// 4. make sure that your environment has all requirements | |
$ rvm requirements | |
// 5. update ruby (will REPLACE current ruby) | |
$ rvm upgrade <current_version> <new_version> | |
$ rvm use <new_version> | |
// 6. update gemset | |
$ gem update --system | |
// 7. install rails (or any other gems) if necessary | |
$ gem install rails | |
$ gem install compass | |
// 8. update gems | |
$ gem update | |
// 8bis. in case of failure when updating a gem, cleanup and update again | |
$ sudo gem cleanup | |
$ gem update | |
// 9. update nodejs | |
$ nvm ls-remote | |
$ nvm install <new_version> | |
$ nvm alias default <new_version> | |
// copy node package from previous version | |
$ nvm use default | |
$ nvm copy-packages <previous_version> | |
// 10. install Yeoman | |
$ npm install -g yo grunt-cli bower | |
// 11. update Yeoman and other global NPM packages | |
$ npm update -g | |
$ npm prune -g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment