Bryan Geraghty

Archive for November, 2010

Complie Simple C Programs With Vim

by Bryan on Nov.30, 2010, under Programming

When working on simple C programs, I like vim to produce a compiled output-file named the same as the source file with the .c extension removed when I issue the :make command. For instance, if I create a source file named “helloworld.c”, I want the compiled binary to be named “helloworld”.

UPDATE:

I discovered this simpler command which does not have any external dependencies. Add it to your ~/.vim/ftplugin/c.vim file.

set makeprg=gcc\ %\ -g\ -o\ %:r

Here is the old command I came up with which uses Perl for the substring extraction. I’m leaving this here as a reference for how you might do other things.

set makeprg=gcc\ -g\ -o\ $(perl\ -e\ 'print\ substr(%,0,-1)')\ %
Leave a Comment :, , , more...

Go, Sanford!

by Bryan on Nov.19, 2010, under Security

It’s good to finally see an airport questioning the insanity. I hope this becomes a trend. Unfortunately, they will still have to follow the TSA guidelines, but those change all the time and hopefully the private company will have higher standards of training and accountability for its employees.

The backlash continues over those new TSA screening measures, and now one Central Florida airport has decided to go with a private security screening firm.

The TSA points out that even if an airport decides to use a private firm for security, the screeners still must follow TSA guidelines. That would include using enhanced pat-downs and the full-body scanners if they are installed at the airport.

via: http://wdbo.com/localnews/2010/11/sanford-airport-to-opt-out-of.html

1 Comment :, , , , more...

Adobe Reader X – Upgrade Now

by Bryan on Nov.19, 2010, under Security

For those of you who aren’t aware of what’s been going on, Adobe has been working on a “sand-boxed” version of Reader to help protect the underlying operating system from whatever flaws it may have. Now, it was just released, so who knows how effective their sand-boxing attempt will prove to be; However, it will most definitely be better than what we have now: Reader vulnerabilities being reported every couple of weeks.

I urge everyone to download and install this update as soon as possible.

Here is the download link:
http://get.adobe.com/reader/

Here is the press-release from Adobe:
http://blogs.adobe.com/adobereader/2010/11/adobe-reader-x-now-available.html

1 Comment :, , , , more...

Vim and .sql files

by Bryan on Nov.18, 2010, under Programming

Hey, have you opened a .sql file in vim and realized with great irritation that you cannot use the left and right arrow keys to navigate in insert mode? Well, here is how you fix it.

Add the following to your ~/.vimrc or ~/.vim/ftplugin/sql.vim file:

let g:omni_sql_no_default_maps = 1
Leave a Comment :, , , more...

Congratulations, Sebastian Vettel

by Bryan on Nov.14, 2010, under Random Stuff

Congratulations to Sebastian Vettel and Red Bull. Well done. Playing fair always pays off.

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Links

A few highly recommended links...