Hobby

Hobby

Bash controlled Raspberry Pi 3B relay hat

If you would like to control some electrical devices by switching them on and off then one possiblity is to use Rasberry Pi relay hat. It is from Waveshare/Botland and it fits on top of your Raspberry Pi. It contains 3 relays controllers with screw connectors. Once you wire your devices you can even put it within DIN box like this one below. Be sure to be careful inserting micro SD card as this box fits tight and you can easily break card apart like I once did. In order to control relay connectors first you export pins: Then you

Hobby

c++11 on MacOS 10.8.5 or even 10.4.11

I tried to compile my c++ code with c++11 features on GCC 4.2.1 which is default on my MacBookPro3,1 with MacOS 10.8.5. I used random library, so I needed newer version of GCC, 4.7 at least to be more precise. I already have MacPorts on this machine (installation guide can be found here). So: No I can compile: Even that you use GCC 5.5.0 you need to pass flag to enable c++11. If someone thinks that this was too easy, then lets try to do this on MacOS 10.4.11 on PowerBook3,4. First thing is to install XCode 2.5 which suppose

Hobby

MacPorts installation on 10.8.5

To bring and old MacBookPro up to date you can use MacPorts. First you should download and install MacPorts package from macports.org. There is a pkg file to use specifically for Mountain Lion. That’s the easy one. A little harder would be to grab working XCode with command line tools. You need to have Apple ID, not quite sure if there is different one to access developer.apple.com but mine works just fine. Go and download XCode 5.1.1 and command line tools, file names are as follows: XCode requires accepting licence with the following command: As you will install command line

Hobby

Apple MacBook Pro 15 inch (2007)

I have this nice MacBook Pro (3,1) from 2007. It has Intel’s Core 2 Duo running 2.2 GHz. Unfortunately the battery is dead or electronics reponsible for charging it. It arrived fully charged and was working for like 2 hours or so. In case the battery runs our of any kind of charge and it is not recognized by the system, then the computer will not start at all. This was like a shock to me, but it’s the Apple hardware. To start MacBook without the battery you need to: press and hold power button for 10 seconds with power

Hobby

(X)Ubuntu on ThinkPad T61

Recently I got Lenovo ThinkPad T61 in working conditions. It has Intel Core 2 Duo T7100 @1.8 GHz, 4 GB of DDR2. At its maximum it can have up to 8 GB of RAM and C2D T9500, altough I’m not quite sure if changing CPU would be straightforward operation – it seems to be socketed, not BGA. I purchased it because of NVIDIA NVS 140M dicrete GPU onboard and unconventionally high screen resolution of 1680×1050. This comes as a benefit but makes few things difficult. Windows 10 works just fine. But if you want to have Ubuntu on it… it