Franco's blog
Quickly fixing SSH when the remote key changes!
So, you cloned your virtual machine and made sure it has the same MAC addresses so that it would pull the same IP from the DHCP server lease. but the next time you click on your SSH icon, it fails.
Does this look familiar?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Well this is the magic line:
Offending key in /home/someuser/.ssh/known_hosts:19
Easy batch renaming in Ubuntu (and other debian systems)
Ever want to rename 300 .foo files to .bar? wish you could do this:
mv *.foo *.barHere is the answer: Debian Rename included in ubuntu.
this example renames all .php5 files to .php
rename ‘s/\.php5/.php/’ *.php5
SCITE: Make those line number show every time
first, open scite from a terminal as root using:
sudo sciteWhen the editor is open choose : "Open Global Option File" from the Options Menu
uncomment or enter these lines:
line.margin.visible=1
line.margin.width=4Next time you open scite, the line numbers should be there already.
Cheers!
Turn a folder full of pictures into a timelapse video
So I like to build things, I also like to set up a GoPro camera above my desk to capture timed photos of my builds, but the results are usually 5 - 8 gigabytes of pictures that need to be turned into movies, so here is what I do:
ASSUMPTIONS: your pics all end in .JPG and the are all numbered sequentially. and that your system can handle video as big as your fotos.
I run this line of code from the folder where the pictures are:
Recursive search for files with specific content using GREP
So you know that somewhere in your source folder (/source) that there is a script that uses the foo() function but you cant remember which one and there are thousands of files, what do you do?
You grep them!
grep -R -i -n 'foo()' *
Lets break it down, first we are grepping files, the -R indicates to search recursively, -i indicates we want to ignore case, and -n indicates we want to know which line of the file grep finds our search string on. then the search string in single quotes and lastly, a finame wildcard, in this case, search through every file.
What ports are open on my Linux box?
Running the following code shows what opports are open on yourtr linux system:
netstat -anp --tcp --udp | grep LISTEN
How do I know what version of PostGreSQL I am running?
Run this simple query on any database in the server:
SELECT version();you should see a result something like:
"PostgreSQL 8.3.9 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Ubuntu 4.3.2-1ubuntu11) 4.3.2"The next question will logically be, how do I determine the version of PostGIS running on PostGreSQL?
query any DB with this code:
select postgis_full_version();will give a result like:
"POSTGIS="1.5.1" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.6.1, 21 August 2008" LIBXML="2.7.5" USE_STATS"
Fix for Ubuntu GPG error related to PPAs
Problem
When you try to access ubuntu extras you might see following GPG error
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used.
GPG error: http://extras.ubuntu.com maverick Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/Release
Solution
Open the terminal and run the following commands
gpg --keyserver keyserver.ubuntu.com --recv 3E5C1192
Wrangling your bash shell into line
While I love my hosting provider, they have some issues, ones I have learned to live with.
to configure your bash shell to show you a nice prompt do this:
PS1='\u@yourdomain.com [\w]# 'to make and use a local bin directory try this:
PATH=$PATH:~/bin
Fort Smith RC Club site goes online
The Fort Smith RC Club website is online, and open to local RC hobby enthusiasts. Sponsored by Western Willow Ventures Inc.
Find it here:
http://rc.westernwillow.com
Tags in Blog Tags
Noteworthy News
- EPIC Hexacopter HEAVY Lift Test!! 15lbs of BEER??
- Amazing Video: 'Jet Man' stunts alongside fighter jets over Alps
- RoboKopter Policja bieg
- The Man Who Made Things Fly - Avios (official version)
- My Guitar Gently Weeps - Tom Petty & Prince Tribute
- 11-15-11 4 - Special Comment - Mayor Bloomberg - Countdown with Keith Olbermann
- Let There Be Light...
- Quardino VC-450 MAS Prop Test