Posts

Showing posts from February, 2013

Configuring the Fedora window manager

Pick a different window manager There are lots of window managers out there. Right now, Gnome is having some trouble running in a VM because VMWare's 3D acceleration does not work with it. Pick a lighterweight one like Cinnamon.   sudo yum install cinnamon Reboot. When you are entering your password to log in, use the services dropdown to change to Cinnamon (or whatever other window manager you selected). Smaller title bars The default title bar on Fedora windows is too tall. It wastes a lot of screen real estate. After trying several of the suggestions out on the 'net, I found that this one works for me (Fedora 18 with Cinnamon window manager). http://mikeyshelpdesk.blogspot.com/2011/04/gnome-3-massive-title-bar.html * Find your metacity theme files. They should be in /usr/share/themes/Adwaita/metacity-1 * Find each instance of "title_vertical_pad" and change it to zero *** NOTE: You'll need to make this change each time the .xml files are update...

Adding Ruby on Rails to the development environment

Ruby on Rails Once you have your basic development environment up and running, you may want to add Ruby on Rails to it. Follow these steps. Tools to install $ sudo yum install ruby $ sudo yum install ruby-devel $ sudo yum install sqlite-devel $ sudo gem install rails $ sudo gem install therubyracer Install MySQL This page is far more informative and covers many other use cases and linux variants:  http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch34_:_Basic_MySQL_Configuration But, if you want a super-quick startup, here goes... $ sudo yum install mysql $ sudo yum install mysql-server $ sudo yum install mysql-devel $ sudo chkconfig mysqld on $ sudo service mysqld start    # or reboot $ mysqladmin -u root password "the password" $ mysql --user=root --password="the password" mysql> create database dev; mysql> grant all privileges on dev.* to devuser@"localhost" identified by 'a password'; mysql> q...

Acronyms

Acronyms that I run into from time to time There is a set of acronyms that I run into often enough to need to know what they are, but not often enough to actually remember what they are. I'm hoping that by writing them down it will help me remember them. ACID - Atomicity, Consistency, Isolation, Durability. The properties that make up a reliable database updating mechanism.  http://en.wikipedia.org/wiki/ACID AJAX - Asynchronous JavaScript and XML. This one is slippery. XML is not required; JSON is usually used. The requests do not need to be asynchronous. Essentially, this is a way of building UIs wherein the UI is responsible for polling information from the server at the UI's desired update rate. This is all on the UI; there is no server control over the rate.  http://en.wikipedia.org/wiki/Ajax_(programming) CRUD - Create, Read, Update, Delete. These are the basic functions needed to implement persistent storage.  http://en.wikipedia.org/wiki/Create,_read,_updat...

Technical Books I Own

Technical books I have read or am reading JavaScript: The Good Parts I have not started reading this yet. It was given to me by a friend who works at a company that uses JavaScript heavily. He assures me that the core of the language is actually very solid. Programming Pearls, Second Edition Only a little way into this. I would read it faster, but there are *so* many programming exercises to stop and puzzle out first. Concrete Mathematics: A Foundation for Computer Science Purely Functional Data Structures This wasn't quite what I thought it would be. I was expecting to be led through a discussion of new data structures that really only apply to functional programming. Instead, it shows mostly well-known data structures (lists, trees, etc.) and talks about the performance differences between functional and imperative programming. Haskell: The Craft of Functional Programming Yuck! What a horrible book. Maybe, if you have never touched a computer in your life, ...

Using 'perf' to profile your program in Fedora

Installing perf If perf is not already on your system, run this command:   $ sudo yum install perf On my system that installed: perf-3.7.9-101.fc17.x86_64 Running your application to collect data One of the nice things about perf is that you don't need to compile your executable in any special way. You can run perf no matter how you built your executable (as far as I know). To profile your application, do this:   $ perf stat ./bigint_test    Performance counter stats for './bigint_test':         11461.887097 task-clock                #    1.015 CPUs utilized                          155 context-switches              #    0.014 K/sec                                    0 cpu-migrations ...

Setting up gdb in Fedora

gdb installation gdb comes with the standard g++ install. However, many of the debugging symbols do not. Run gdb on one of your executables. Tell it to "start" and it will check to see if system debugging symbols are available. If they are not, it will tell you what command you need to execute to install the debugging symbols. On my Fedora install gdb gave this instruction (some output removed for clarity): $ gdb graphlib_test GNU gdb (GDB) Fedora (7.4.50.20120120-54.fc17) Reading symbols from graphlib_test...(no debugging symbols found)...done. (gdb) start Temporary breakpoint 1 at 0x40522c Missing separate debuginfos, use: debuginfo-install glibc-2.15-58.fc17.x86_64 libgcc-4.7.2-2.fc17.x86_64 libstdc++-4.7.2-2.fc17.x86_64 (gdb) Run that command as root to install the debugging packages:   $ sudo debuginfo-install glibc-2.15-58.fc17.x86_64 libgcc-4.7.2-2.fc17.x86_64 libstdc++-4.7.2-2.fc17.x86_64 You can verify the system debug symbol installation was comple...

Haskell Resources

Haskell Resources http://www.haskell.org/

Installing MacOS (Mountain Lion) in a VM

Installing MacOS (Mountain Lion) in a VM Go to the App Store and download the Mountain Lion installer. In this case I used VMware Fusion. Start VMware Fusion and follow these steps: Click on File->New... Click on "Continue without disc" Click on "Choose a disc or disc image..." twice Navigate to the Applications folder Select "Install OS X Mountain Lion" Click on "Open" Click on "Continue" Verify that the Operating System shows as "Apple Mac OS X" and that the Version shows as "Mac OS X 10.8 64-bit" Click on "Continue" Click on "Finish" to let the install start You will be asked where you want to save the VM. Use the default or select somewhere else. Whatever your preference. When you first boot into the VM it will likely not take advantage of your full display. This will fix itself as soon as you install VMware Tools into the VM. To install tools: Boot the VM Log in...

Git Usage

Git Docs Pro Git: http://git-scm.com/book Visual Git: http://marklodato.github.com/visual-git-guide/index-en.html Merge vs Rebase: http://mislav.uniqpath.com/2013/02/merge-vs-rebase/ Subtleties of reverting: http://everythingsysadmin.com/2013/02/reverting-in-git.html Getting started with Git Do these steps before doing anything else in git. You need your name and email set correctly so that commits get attributed properly to you.   git config --global user.name "Your Name"   git config --global user.email your_email@your_domain.com   git config --global core.editor emacs   git config --global merge.tool vimdiff Creating a new, local Git repo Go to the root of the source tree that you want to put into Git. Type this command:   git init This will create a .git directory in the directory you are in. The .git directory will contain all of the Git repository. Don't delete it! To see the status of your project, type:   ...