Skip to content

Instantly share code, notes, and snippets.

View martincr's full-sized avatar

martincr martincr

View GitHub Profile
@martincr
martincr / gist:f5d6636b66c484e28510
Last active August 29, 2015 14:13
.bash_profile
# .bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@martincr
martincr / gist:9fef9e4b4d1caf5e3ec4
Last active August 29, 2015 14:13
ST3 subl bash shortcut
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl
# Works with OS X 10.9(.5) Mavericks
@martincr
martincr / gist:7028087483694567c606
Created January 10, 2015 03:29
cleanout-rvm.sh
#!/bin/bash
/usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm
/usr/bin/sudo /usr/sbin/groupdel rvm
/bin/echo "RVM is removed. Please check all .bashrc|.bash_profile|.profile|.zshrc for RVM source lines and delete
or comment out if this was a Per-User installation."
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"copy_with_empty_selection": true,
"ensure_newline_at_eof_on_save": true,
"ignored_packages":
[
"Vintage"
],
"index_files": true,
@martincr
martincr / Python-3-Django-El-Capitan.md
Last active May 4, 2022 05:04
Install Python 3 and Django on Mac OS X El Capitan (10.11.2) - and use virtualenv and virtualenvwrapper

Preamble

Background Reading

Database setup ##############

Using PostgreSQL, you need the psycopg2 package pip install psycopg2

psql
CREATE DATABASE mydjangosite;
\l
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/PATRIOT2 --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/ELCAPITAN --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
1. Once your USB drive has been created, it's time to install El Capitan.
2. Restart your Mac and hold down the Option key immediately. When your machine boots up, choose the USB drive that says "Install OS X El Capitan"
3. Select "Disk Utility" and then select your main hard drive. Press "Erase" on the volume. Remember, this will erase EVERYTHING on your machine.
4. Go back to the main menu and choose "Install OS X." Select your internal hard drive when prompted and continue with the installation.
@martincr
martincr / sublime-text-3-user-settings.md
Created January 25, 2017 14:55
Some basic personal user settings for ST3.

{ "font_size": 12, "rulers": [80], "translate_tabs_to_spaces": true, "word_wrap": "true", "ignored_packages": [ "Vintage" ] }

@martincr
martincr / gist:96fcb70d054a2c2e874594862b89a2b8
Last active March 20, 2021 11:24
Installing NPM to avoid using sudo on Mac OS X El Capitan. Node.js installed via https://nodejs.org/en/
$ node -v
v6.9.5
$ which gcc
/usr/bin/gcc
$ npm -v
3.10.10
$ mkdir "${HOME}/.npm-packages"
https://images.unsplash.com/photo-1448318440207-ef1893eb8ac0
https://images.unsplash.com/photo-1447678523326-1360892abab8
https://images.unsplash.com/photo-1445754574409-bcd715e18017
https://images.unsplash.com/photo-1444682717031-a2498d603d5b
https://images.unsplash.com/photo-1442405740009-7b57cca9d316
https://images.unsplash.com/photo-1439337153520-7082a56a81f4
https://images.unsplash.com/photo-1433832597046-4f10e10ac764
https://images.unsplash.com/photo-1430651717504-ebb9e3e6795e
https://images.unsplash.com/photo-1428190318100-06790c8b2e5a
https://images.unsplash.com/photo-1422504090664-c57eba84293f