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)')\ %
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
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
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
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.
My hope for this site is that my thoughts and experiences find their way to those who can make use of them. I've been a professional software developer and amateur photographer since 1999 and an amateur musician for nearly 20 years. I have done a fair-share of paying gigs and teaching, but nowadays, I spend most of my music-related time in my home studio. Most of my writing will fall into the main site categories, but I also enjoy reading, running, and auto-racing, so look out for posts on each of those from time to time. Enjoy.