first install homebrew if you don’t have it already!
download and install Python 2.7.x from python.org
Then in Terminal:
brew tap cartr/qt4 brew tap-pin cartr/qt4 brew install qt brew install pyside brew install cartr/qt4/pyqt@4
To enable Python.org Python to find packages from homebrew:
mkdir -p /Users/xxx/Library/Python/2.7/lib/python/site-packages echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/xxx/Library/Python/2.7/lib/python/site-packages/homebrew.pth
Install requirements for Flatcam
brew install geos brew install spatialindex sudo -H pip install numpy matplotlib rtree scipy shapely simplejson sudo -H pip install svg.path
Download FlatCam from http://flatcam.org/download
Applescript to Start / Icon on Mac OS
tell application "Terminal" activate do script "python /Applications/FlatCAM-8.5/FlatCAM.py; exit" end tell
Sometimes a very strange behavior (bug?) happens between Vagrant and Apache running inside the vagrant box. It feels like there is some kinda cache, as changes in files on the host seem to have no effect on a file served by Apache.
in your httpd configuration (
/etc/httpd/conf/httpd.conf) change EnableSendfile to off:
# rw: disable sendfile when using inside a Vagrant / VM evironment!! # can cause file changes to be ignored, even if caching is disabled!!! EnableSendfile off
Don’t know if it’s related to my upgrade from 10.10 to 10.11, but today i could not connect to oracle databases using navicat with the error “OID could not be created”.
To fix it type this in Terminal:
$ sudo scutil --set HostName my.host.name
Then also add this name to the localhost line in /etc/hosts
127.0.0.1 localhost my.host.name
Then restart your computer.
I use both OpenPGP and S/MIME in my Apple Mail, but by default all new Messages are sent using OpenPGP. It’s easy to change this behaviour in the Terminal:
Set S/MIME as default security method
defaults write org.gpgtools.gpgmail DefaultSecurityMethod -int 2
Use OpenPGP as the default again:
defaults write org.gpgtools.gpgmail DefaultSecurityMethod -int 1
As a remainder:
When using Raspberry Pi Raspbian with some mice, the cursor lags and is slow and feels very unresponsive.
- insert your SD card in your computer
- edit cmdline.txt
- add this to the end of the cmdline: usbhid.mousepoll=0
- save, eject SD and start Raspberry Pi
When using git on Mac OSX and your project’s folder has a custom icon, you will see a “Iconr” File showing up in your git status or Source Tree. Ignoring this file doesn’t work.
The solution is to ignore the correct way (or syntax), because Apple uses ^M at the end of the filename, which is a CRLF, a hidden character. In fact you have to ignore “Icon^M^M” in your .gitignore file, but it’s not easy to enter these special characters as ^M is in fact one single CRLF character.
I found a hint using the ruby interactive interpreter, but i wanted to use my beloved Python, so here’s the code:
>>> f = open('.gitignore','a') >>> f.write('Icon\r\r') >>> f.close()
use this in your home directory as you need to edit ~/.gitignore and ~/.gitignore_global (for Source Tree)
I had the need to shrink a 16GB microSD card to use the image on my other Raspberry Pi, but only had smaller SD Cards lying around. So what now?
After a lot of tests and googling i found a way to get this working on my Mac OSX.
Things you need:
- Apple Pi Baker
- gParted Live Image
- CD Burner and empty CD or an USB Stick with at least 256 MB
- big SD Card containing current Raspberry Pi image
- smaller SD Card (2GB, 4GB, …)
Apple Pi Baker is a GUI to copy Raspberry Pi or other .img files to a SD card or USB stick, like using dd from command line, but with the advantage of using a GUI and displaying the time remaining for the process to finish. Additionally you can use it to create a .img from a SD card (backup) or create a Raspberry Pi NOOB SD card.
Part I: gParted
Download gParted live image from http://gparted.org/download.php
When using a USB drive:
- convert the downloaded .iso to a .img in the directory containing the .iso with this Terminal command:
hdiutil convert source.iso -format UDRW -o destination.img
- then use Apple Pi Baker to copy the gParted.img to the USB Stick
When using a CD:
- open the .iso in Disk Utility
- Burn this image
Then connect the USB stick to a Mac or PC or boot from the CD.
Start gParted an then select the SD card (on Mac you will need to use a USB SD card reader as the internal SD card reader is not supported) and select the second (big) EXT4 partition and resize it to a bit bigger than the minimum size or a little bit smaller than the desired SD card size (1.9 GB for a 2 GB SD card).
eject the SD card and / or restart your computer.
Part II: create card image and restore
Use Apple Pi Baker to backup your (big) SD card. This will create a image in the size of the card, not in the size of your shrinked image!
The trick is to restore this image to the smaller SD card. This will work, because you shrinked all partitions below the size of your (smaller) SD card. Apple Pi Baker will diskplay a warning that the image is to big to restore to the SD card, but it will stop when the card is full.
Now we have the smaller SD card and we’re almost finished.
Part III: fix the SD card
Now insert the smaller SD card into your Raspberry Pi and power it on to boot.
Booting will fail as fsck will fail to repair the card automatically. But pressing CRTL-D to continue will fix the problem and reboot the Raspberry.
Part IV: backup the smaller SD card (optional)
Now it’s a good idea to backup the small SD card to a now smaller .img because the backup will always have the size of the card used. Use Apple Pi Baker for this again.
To fill the whole SD card use this command in the Terminal of your gParted Live CD / USB stick, where XXX is the name of the SD card (eg. /dev/sdc2):
# resize2fs /dev/XXX
Lately i thought it’s a good idea to reuse the old XServe 2009 Model (only capable of running OSX up to 10.6) as a VMWare Sphere Host. But this model has just one harddrive installed in an ADM (Apple Drive Module) with a capacity of 80 GB.
I grabbed a 2 TB Western Digital green harddrive and replaced the 80 GB drive in the drive carrier.
But the ESXI installer couldn’t find the drive 🙁
After some online research i found a hint that the ADM only use 1.5 Gigabit Mode for Serial ATA. So i installed a jumper on position 5-6 on the Drive and voilà – it worked!
seems to be a bug in VirtualBox 4.3.10, but there is a quickfix available. Do vagrant ssh and then:
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
As Sublime Text 3 is around in public beta for quite some time, i thought i upgrade from my 2.x version to the new and – as it’s written on their homepage – faster version 3.
Ross Lawley has a perfect guide how to upgrade painlessly:
And thanks for the hint to check the compatibility of the plugins first on this great page:
Steps how i upgraded:
- download Sublime Text 3
- install package manager in Sublime Text 3 by showing the console (view -> show console) and entering this text:
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
- using the package manager install all your (green) plugins you used on Sublime Text 2
- copy and paste user settings (Preferences -> Settings -> User)
- go to terminal and copy TM Themes, other settings and relink the commandline “subl” to the new version (i have ~/bin in my path):
$ cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/*.tmTheme* ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/ $ rm ~/bin/subl $ ln -s /Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin/subl ~/bin/subl