Viewing Category : simple

Post thumbnail of How to Create samba users and Verify they can connect
13 January 2012
Continue reading How to Create samba users and Verify they can connect

How to Create samba users and Verify they can connect

This is the simplest way I know to get samba up and running. This isn’t the most secure, best, smartest, etc. It’s just for testing and getting up and running as quickly as possible.

Post thumbnail of Hide a dialog without destroying - pygtk one-liner
2 September 2011
Continue reading Hide a dialog without destroying - pygtk one-liner

Hide a dialog without destroying - pygtk one-liner

If you like the standard window decorations and dont need/want to create your own buttons to handle custom events, closing a dialog without destroying it is a simple one-liner in pygtk. This is helpful when you have logic that replaces individual widgets inside a dialog and you don’t want to recreate the whole dialog.

Post thumbnail of Grep special cases from the command line
16 August 2011
Continue reading Grep special cases from the command line

Grep special cases from the command line

Looking for all the libraries passed to the linker in Makefiles or some other minus-L thing? The easiest way around this is to escape the minus sign.

Post thumbnail of Fix for yum Error: Cannot retrieve repository metadata for repository
3 August 2011
Continue reading Fix for yum Error: Cannot retrieve repository metadata for repository

Fix for yum Error: Cannot retrieve repository metadata for repository

Can’t install new rpms using yum? Update won’t work? Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again. Chances are if you’re seeing this error message the repository files are not the problem.

Post thumbnail of Boost lexical_cast throws bad_lexical_cast when converting types
20 April 2011
Continue reading Boost lexical_cast throws bad_lexical_cast when converting types

Boost lexical_cast throws bad_lexical_cast when converting types

Using boost to convert one type to another. Take int8_t integer for example. Will this even work? No, because int8_t is a char. You will get a bad_lexical_cast exception. You must static cast to an integer type first:

Post thumbnail of Use Bash to do Math
7 January 2011
Continue reading Use Bash to do Math

Use Bash to do Math

You don’t need calculators or other languages and compilers to do math. You can do a lot in bash (GNU Bourne-Again SHell), and it’s really easy!

Post thumbnail of Simple trick to figure out where your python libraries are stored
27 October 2010
Continue reading Simple trick to figure out where your python libraries are stored

Simple trick to figure out where your python libraries are stored

Here’s a simple trick to figure out where your python libraries are stored.

Post thumbnail of Simple way to install NLTK with optionals in Fedora
21 October 2010
Continue reading Simple way to install NLTK with optionals in Fedora

Simple way to install NLTK with optionals in Fedora

You can go to http://www.nltk.org and download NLTK and all the extras - pyyaml, matplotlib, etc. However, these packages are now in the Fedora repositories which makes it a dead simple task to install.

Post thumbnail of Save size and position of terminal windows on your desktop
23 September 2010
Continue reading Save size and position of terminal windows on your desktop

Save size and position of terminal windows on your desktop

If you have two or more monitors, whenever you first open your terminals, you may find yourself opening more than one and rearranging their placement. Over time you may notice you’re performing the same repetitive task of relocating each window to it’s rightful place. It only takes a minute or two to create panel icons for opening each window using geometry settings defining width, height, and upper left hand coordinates for future placement. If you keep your panel icons in order, whenever you want to open a new one, you’ll know exactly which button to press.

Post thumbnail of Bash integer counter just like in C
6 August 2010
Continue reading Bash integer counter just like in C

Bash integer counter just like in C

In almost all high level languages you can do something similar to x++ to increment an integer counter. Bash doesn’t have an incrementer, but you can still make your own integer counter using back-ticks and expr.

 Page 1 of 4  1  2  3  4 »
Powered by Wordpress   |   Lunated designed by ZenVerse