Ivan Radovanovic's picture

How to find out which preprocessor symbols are defined for C/C++ compiler

Run compiler with arguments -dM -E -xc++ /dev/null. (-x specifies language, so if you want to see predefined symbols for C, you should use -xc instead of -xc++).

For example:
clang -dM -E -xc++ /dev/null

or
gcc -dM -E -xc++ /dev/null

Ivan Radovanovic's picture

Configuring web server with intermediate SSL certificates

If you received intermediate certificates and you need to install them you should simply concatenate them in one file in reversed trust delegating order. So if trust is delegated like this:

root -> intermediate1 -> intermediate2 -> your-site

in pem file certificates should be in this order:

Ivan Radovanovic's picture

Site with nice pictures

Barenova - nice pictures.

Ivan Radovanovic's picture

When USB devices don't run properly in VirtualBox guest

Since FreeBSD is not officially supported by Oracle, they don't make extension pack for it. For this reason all USB 2 and later devices will most likely fail in guest operating systems with weird errors (devices are recognized but they do not work later). Workaround for this is to force device to 1.1 within host operating system and only then to use them in guest OS. To accomplish this:
- disconnect device
- execute sysctl hw.usb.ehci.no_hs=1 as root
- connect device
- map it inside VirtualBox for guest OS to see

Ivan Radovanovic's picture

Making GNOME 3 usable under FreeBSD

As usable as it could be after their developers got infected by that brain parasite (it is funny how functionality-wise pretty much everything is done in wrong way).

Plugins needed/enabled:

Ivan Radovanovic's picture

Script to clean ports

Since make clean seems not to work properly anymore

#!/bin/sh

cd /usr/ports

for port in `find . -name work -type d | sed -E -e 's/\/work.*$//'`
do
cd /usr/ports/$port
make clean
done

Ivan Radovanovic's picture

Running Cinnamon on FreeBSD 10

If it fails to start complaining that it can't find any theme install x11-wm/metacity

Ivan Radovanovic's picture

Compiling latest versions of monodevelop on FreeBSD

Clone their repository from git (tarballs created by them fail way too often)

git clone https://github.com/mono/monodevelop.git

Ivan Radovanovic's picture

Interesting security related read

Can be found here - BetterCrypto.org and ECRYPT II

Ivan Radovanovic's picture

HP printer with FreeBSD

Install /usr/ports/print/hplip-plugin (in the past mirror for that one was quite unstable so it was difficult to download all files needed). After that install /usr/ports/print/cups-filters as well (have no clue why they are removed from normal cups installation but without them you might have lot of errors similar to "Returning IPP client-error-document-format-not-supported for Print-Job". Printer should be working after this.

Pages

Subscribe to codenicer.com RSS