Skip to content

Instantly share code, notes, and snippets.

@j-wang
j-wang / Temporarily using g++-4.2 for Ruby EventEngine
Created July 3, 2013 04:36
I was having trouble install bud (gem install bud) and eventually figured out that it was a problem with the g++ version I had installed (not the mac native 4.2). '-Wshorten-64-to-32' is native to mac only. This gist temporarily replaces g++ with g++-4.2 and then reverses the switch. Error I was getting: Jamess-MacBook-Pro:exercises Avantos$ gem…
mv /usr/local/bin/g++ /usr/local/bin/g++.bak && ln -s /usr/bin/g++-4.2 /usr/local/bin/g++
rm /usr/local/bin/g++ && mv /usr/local/bin/g++.bak /usr/local/bin/g++
@j-wang
j-wang / brew doctor warnings
Created March 5, 2014 09:53
brew doctor warnings
brew doctor
Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.
@j-wang
j-wang / rn_cache_clear.sh
Created May 8, 2017 17:07
A little script to automate clearing node modules and packager cache for React Native.
#!/bin/bash
echo "Starting clearing watchman..."
watchman watch-del-all
echo "Removing and reinstall node modules"
rm -rf node_modules && npm install
echo "Clearing packager cache..."
rm -fr $TMPDIR/react-*
echo "Done."