You are here

freebsd

Ivan Radovanovic's picture

Manually trusting certificate in Chromium

To manually trust single certificate do
certutil -A -d sql:$HOME/.pki/nssdb -t P -n description -i cert_file

To add new trusted CA do
certutil -A -d sql:$HOME/.pki/nssdb -t CT -n description -i cert_file

Ivan Radovanovic's picture

Formatting USB drive with FAT32 using FreeBSD

Assuming your usb drive is /dev/da0

Using fdisk:

  • Zero disk beginning with
    dd if=/dev/zero of=/dev/da0 bs=2m count=1
  • Change first partition type to 12 (FAT32)
    fdisk -i /dev/da0
  • Initialize fat32 file system
    newfs_msdos -F32 /dev/da0s1

Using gpart:

Ivan Radovanovic's picture

Debug gstreamer plugins

To discover which plugin is used for specific file run command similar to this:
gst-launch -v filesrc location=filename_here ! decodebin ! autoaudiosink
that should give you (among other things) output lines similar to these:
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/x-id3
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstID3Demux:id3demux0.GstPad:sink: caps = application/x-id3
Pipeline is PREROLLING ...

Ivan Radovanovic's picture

If Netbeans fails to start

Try this:
env LD_PRELOAD=/usr/local/lib/libjpeg.so netbeans-7.3

(or whatever version you are using if not 7-3)

Ivan Radovanovic's picture

Using Compiz with FreeBSD

For setting up X server follow instructions here. (Long story short, use nvidia driver, add glx and extmod extensions to xorg.conf, and add argb-glx-visuals to monitor.)

Ivan Radovanovic's picture

How to mount ISO with FreeBSD

Like this:
mdconfig /path/to/iso
mount -t cd9660 /dev/mdX /mountpoint

X being md unit reported by mdconfig command.

After done with ISO unmount it and delete md created for it:
umount /mountpoint
mdconfig -d -u X

(Again X being md unit as reported during creation)

Ivan Radovanovic's picture

How to format json data

Using python from command line:
cat file.json | python -mjson.tool

Keep in mind this will sort keys in structures.

Ivan Radovanovic's picture

Running unit tests from console

If you created and compiled unit tests using MonoDevelop you need to copy several dlls to the same directory before you can use nunit-console with compiled dll. Those libraries can be found /usr/local/lib/monodevelop/AddIns/NUnit directory

Ivan Radovanovic's picture

Installing monodoc on FreeBSD

I don't have any idea if mono-tools is still supported package, but its build is badly broken at least on FreeBSD. Anyway, the only tool I find really useful there is monodoc, which luckily can be installed manually like this:

Ivan Radovanovic's picture

Managing user groups on FreeBSD

Group creation

pw groupadd name-of-group

To add users to group

pw groupmod name-of-group -m username1,username2,...,usernameN

NOTE: usernames in list are separated only by comma, you can't add space too.

Pages

Subscribe to RSS - freebsd