Tuesday, June 17, 2008

How to view stuff on linux

So, I have been learning a butt load about linux lately. This means I have hardly scratched the ice berg, but just in case someone finds themselves as lost as I was at first, here is a quick list of commands to view files on Linux.

If you open a terminal, and navigate around a little (if you don't know how to navigate, try Googleing change directory) eventually you find a file that you want to open and read/edit

Sometimes this read/edit stuff can be hard, so here are a few things to try:

vim filename
gedit filename
emacs filename
edit filename
less filename
more filename

If all else fails, you can do cat filename, which just prints out the contents to the terminal, no editing allowed.

To exit out of those text editors can also be challenging. Try Esc, or hit : then q. The : tells it you want to issue a command, and q is for quit(or quit/save). I am sure there are others, like quit and no save, but you will have to look those up on your own.

hamy

Monday, June 9, 2008

Getting aircrack to work on Dell Latitude D620 using Ubuntu

Update - I have gotten this working and am working on writing a basic intro to how I did it. Before I do that, however, I would like to basically try it from scratch again to make sure I can write a decent tutorial.

So, I am trying to get aircrack installed on Ubuntu. I have never been able to get a wireless card to capture in 'promiscuous ' mode, meaning (as I understand it) that it not only captures the packets to/from you, but also all the packets to/from everyone else that are in range of your card.

So, figured I would give it a shot. So far its a spotty road.
Started with this nice tutorial
http://www.aircrack-ng.org/doku.php?id=getting_started

Sadly, my card was not listed ;0 . Following the recommendation, I Google Linux, which brings me to this lovely article
http://intellinuxwireless.org/?
Note: The iwlwifi project provides a driver which utilizes the mac80211 subsystem for the Intel® Wireless WiFi Link 4965AGN and Intel® PRO/Wireless 3945ABG Network Connection adapters.

So, I get busy trying to install the mac80211 stuff. I go through a lot of stuff, but the final result is not so good. One thing to note that is not on their page about install the subsystem, got off zolton's blog was this line
sudo ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/source

Otherwise your compilation fails b/c it cannot find anything in the /source folder.

So, I managed to make, and then make_install. Sadly, I got weird errors make modules module_install stage on the how to install mac80211 subsystem page

turns out that with ubuntu 8.04 there is a bug in the kernal, and its not exactly a breeze to get it working till that is fixed.

So, I twiddle my thumbs for a bit and head on over to the compat-wireless project. So far, its going well. I have DLed the tar, ungipped, and we are compiling ;)

Post updates if I get it working.

Sunday, June 8, 2008

Weird C Sharp Errors I ran into today

So, I just spent a while trying to fix these CS errors:

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cuts_try_3\9354e1fa\4cc0037f\App_Web_drt6meif.2.cs(237,29): error CS0115: 'ASP.savedcharts_aspx.GetTypeHashCode()': no suitable method found to override
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cuts_try_3\9354e1fa\4cc0037f\App_Web_drt6meif.2.cs(242,30): error CS0115: 'ASP.savedcharts_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cuts_try_3\9354e1fa\4cc0037f\App_Web_drt6meif.2.cs(128,18): error CS0535: 'ASP.savedcharts_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable'

After a reasonable amount of time, I realized one of my files is named SavedCharts.aspx

So, whats the problem? When you choose place code in a separate file (aka code behind), .NET auto generates that file for you. Supercool. The problem comes when you rename the newly created file (like renaming default.aspx to, lets say, savedcharts.aspx). Sometimes, the class name in the code behind file does not get changed.

Here is a quick example that would throw these errors:

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CreateNewUT.aspx.cs" <span style="color: rgb(51, 204, 0);">Inherits="CreateNewUT"</span> Title="Untitled Page" %>
<-- insert asp/html page here -->

public partial class<span style="color: rgb(255, 153, 0);"> Default :</span> System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}


The problem is, I changed my page, and told it to inherit from class CreateNewUT. But, I didnt rename the class in my code behind page. To Fix:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CreateNewUT.aspx.cs" <span style="color: rgb(51, 204, 0);">Inherits="CreateNewUT"</span> Title="Untitled Page" %>
<-- insert asp/html page here -->

public partial class<span style="color: rgb(255, 153, 0);"> <span style="color: rgb(102, 255, 153);">CreateNewUT :</span></span> System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}


Hope that helps someone ;) Don't know why VS and/or VWD 2008 seem to correctly rename the class some and not some, but hopefully that gets ironed out soon.

Hamy

Friday, June 6, 2008

FTP Backup

So, today I started using Fling, a nifty little freeware FTP backup utility that lets me create a folder (call it BackedUp for me) and put whatever I want in there to be backed up to my server. Pretty cool huh?

All in all, great simple product. I would recommend, and i found a good source for freeware in the meantime ( http://www.nch.com.au/ ), if you don't mind putting up with some bad advertising its good software

hamy

Things I like:
  • it notices when files change, and auto backs them up again
  • nifty icon lets you know its running - not gaudy. Quite a pleasing icon ha ha
  • it keeps a running log so you can open the window and see what it is currently doing
  • they put X's or checks on files to let you know whats backed up(currently, about 7 or 8 Gigs of pictures have little a 'x' :) ).

Things I don't like:
  • The way the company advertises. I started out looking at another product of theirs but gave up and uninstalled after it added like 5 things to my start menu. (Yep, i scanned it. Its not a virus/spyware, just crappy advertising) However, in defense Fling has been pretty good. If you click the toolbox icon, it auto connects to the net and DL's another installer for another product :( LAME ZoneAlarm caught it, but another instance of bad advertising
  • the fact that you have to put stuff in the BackedUp directory. No multiple directory support, no custom file extensions. They have that with bigger tools, but none of those do the auto backup (although, again in their defense, there is a right click and fling upload menu that I have ignored. I secretly like the BackedUp folder - it keeps me deleting things I don't need)
  • Its not the fastest. I feel like they purposefully slow the upload a tad to preserve your normal Bandwidth

Wednesday, June 4, 2008

iTunes upgrades! Full Lyrics, Album art, ordered Music

So - iTunes has some problems. If you follow along, I will show you a few nifty tricks/programs to do these things:

1 - get lyrics to almost every song you have on your ipod and in your itunes
2 - do the same for album art work
3 - remove those pesky (!) missing files from itunes
4 - find/add the files that you didnt know you had
5 - fix all the ID3 info tags - remove those www.musicblah.blah.whatever links

There are a few things that I can’t do yet - so hopefully more soon. Here is what I can’t do for you:

1 - delete duplicates easily aka not one by one
2 - do ALL the work for you. You still have to put in fifteen minutes. I did all this, and I still have about 100 problem tracks. I will fix them one by one, because I am that guy. Most people probably don’t care. The point is, this stuff does 95% of the work, you still have to help it that 5% along.
3 - i am sure there is another one ;)

So - I did a few simple things to my itunes, mainly:

1 - fix all the ID3 tags (a LOT better than itunes automatic service can)
2 - remove the bad stuff (missing files, ect)
3 - get the lyrics
4 - get the artwork
5 - sync!

To see the rest of this - You will need to click read the rest link right below

Starting with 1 - fix all the ID3 tags
Flat out, this is the hardest and/or longest step. Once this is done, its just one click and waiting on your part, so stick the first part out!
1) download a nice program called MusicBrainz http://musicbrainz.org/.
2) install, open
3) add folder, and select your My Music folder (or main music folder - it will get subdirectories auto)
4) once it is done processing, click cluster
5) both of those steps take a bit. Once that is done, select all unclustered files (to save time here, try to only select the files that you know are songs. Aka dont select your recorded lectures - you are just wasting time) and click scan
Note: basically it is ‘listening’ to every file, and trying to match it against a database of files. This is really nice, it can turn ‘track 15′ into ‘Crash Into Me’ by …

6) Select all the albums that popped up on the right (click one, and hit ctrl + A) and click the big ’save’ button at the top.
Note: Scroll to the top of the right album list before you click save, and you can see the *’s going away. AKA they indicate unsaved albums.

7) Open itunes, if its not open, and select all songs (click to select one, and hit ctrl + A). right click, and choose get info. Ignore the warning, and hit ok — NOTE: DO NOT HIT ANYTHING BUT OK. YOU WILL WIPE ALL DATA FROM YOUR SONGS OTHERWISE

8) this is the end of the auto tutorial on this part, but FYI this is a really powerful program. You have to put some effort in to understand how to really work it, but if you are a fanatic this program is very valuable.

Now on to 2 - remove the bad stuff (missing files, ect)
1) Download and install ITLU http://itlu.ownz.ch/wordpress/?page_id=5. Note: he recommends backing up the library, which I did, but I have had no problems with the program

2) open the beast
3) click the blank square next to Location, browse to your My Music directory (or other main music place) and click ok to add it.
4) click every single box
Note: it is smart to actually repeat this step twice. (well, from 2 ;) ) The first pass will remove all the files that are linked incorrectly, and the second one will add them back, linked correctly. In laymans terms, run it twice ;)
5) click start, and grab a snack

Pressing on …. 3 - get the lyrics
1) download/install iLyrics http://code.google.com/p/ilyrics/downloads/list
Note: this is in Beta - so you kind of have to sit there and watch it and click ok everytime something unexpected happens. THis is why we removed the bad stuff first - this program has a tendency to crash if a file is missing
Note2: lyrics come from lyricwiki.org - so yea, if you have a song and want lyrics - you can add them to LW and iLyrics will suddenly work for those songs

2) open itunes, and ilyrics
3) in itunes, click music, click on a song to select it, and hit ctrl + A to elect all songgs
4) in ilyrics, click both checkboxes
5) sit there and babysit while it runs. You will probably have to click through about 30 error messages (thats what I had to, with about 2500 songs in my itunes)

Sweet, so on to album art
this ones pretty simple, just choose all songs again in itunes, (select one, then hit ctrl + A) and choose advanced->get album artwork

Sync!!!
now plug in your ipod, and wait for the massive sync

Note: on an ipod touch, seeing the lyrics means playing a song and clicking once on the screen (its kind of hard to find, so fyi if you see the repeat symbol, you are in the right place. If you dont see lyrics, there are no lyrics on that song in itunes. To check - open itunes, find that song, right click and do get info, and check the lyrics tab)

Hope that helps some people! It took me a while to do all this, so I figured I would share some stuff ;) Also - please digg this baby if you liked it!

Hamy

Ha Ha....not much better

I am obviously not a degisner. Wish they had a site that would just let you import a Fireworks png and say make this work. Anyways, this will do for now, so I am going to steal my iTunes post and get back to work. Later, if I am feeling productive I can try to make a real site template.

hamy

Horrid Template

I think order 1 of business (besides failing at finding a good blogging add on for FF) is to change the horrible templates provided, or try to make one ;)

Depressing Start

So I just read thru about 200 FF addons to find one that would allow me to simply click a button in FF, type in a blog, and submit.

The best I have come up with is BlogThis!, which has a depressingly small text entry area in a popup window that cannot be resized. How seriously lame.

I liked the look of scribefire, but I keep getting errors. A comment on their homepage mentions a blogger bug, it seems like I have been a victim. I tried both the old and new api urls, and appended ?alt=rss to them as well.

Any idea how to make scribefire work, please let me know ;)

Side note, its really time to update to FF3. I was trying to hold true to the DL date, but now that Sage Too is coming along nicely to replace Sage, the only thing that was holding me back from upgrading is gone :)

cheers
Hamy

test


this is a quick test