C# Hello World Program NSFW

March 5th, 2008

Alright, sharp on the heals of my Ruby Hello World Program, I’ve done the same thing in C# using Mono on GNU/Linux (Ubuntu). Yes I copied the friggin code from someone else, and modified it. Feck I don’t even know Cfriggin# so cut a guy some slack already. Feck sake!

Here’s yer friggin link: friggin link.

Ruby Hello World Program NSFW

February 27th, 2008

Alright, a friend has been after me to get on the Ruby bandwagon since I met him. I finally ackweeessed. And now I have ruby installed on my Ubuntu laptop.As usual with Ubuntu it is very friggin easy:

sudofriggin apt-get install ruby

sudofriggin apt-get install irb

Though apparently as easy as that shit is…it still aint as easy as a Mac:

Plug in.

Turn on.

Feckin figures doesnt it! Mac bastards.

So naturally once installed I had to write the Hello World progra. Its feckin obligatory ever since some arsefeckwit about six hundred years ago wrote the first computer program. Methinks it is some damnable Frosty The Snowman wanna go back to the womb obsession thing. But who the hell am I to say eh? Yea yeah I agree..I’m Aoirthoir and I know feckin everything. So..here is the damned link to my Hello World program video thingie in Ogg.

Ruby Hello World Program.

Why does my Group_concat return only partial data in MySQL?

January 11th, 2008

Recently I discovered MySQL’s GROUP_CONCAT feature. I’m assuming other DBMSes have something akin to it. In short, it allows you to combine all of the results from a SELECT statement, into one row. It is very useful for generating functions that return data from tables. It is also a great way to avoid the use of CURSORS, something that generally is a big NO NO according to a lot of peeps out there. Myself, I say use them when they are needed. For instance I did a lot of code generation using cursors. But group_concat has saved my butt on that now, and my code generators are blazingly fast. Often they take less than a second to generate several hundred functions.

In the future I will get into some examples of using group_concat. But for now, I just want to cover one caveat. For some reason they decided to have group_concat only return something like 500 characters. That’s fine if all you want to do is concat a group of scores from your bowling season. But if you have lots of data that you are trying to join together, that’s definitely not enough.

There are a couple of ways to increase this. I forget the first one, cause it was nauseatingly irritating. Basically every damned time you open the mysql console (and thus at the beginning of every function or stored proc that uses group_concat) you have to do something like SET @@group_max_concat_some_other_bullshit_that_I_friggin_cant_remember = SOME DUMB NUMBER.

I decided to cheat and just modified my.cnf. Here it is:
#This line was here originally and I have not changed it
max_allowed_packet      = 16M
#added by joseph on 2007-12-16 so we dont have to put it in every file
group_concat_max_len = 16M

16M I am assuming is Megabytes. I dont really care, because it works.

(Isnt this the cart before the water tower? Shouldnt you be telling us how to use group concat first?)

Uh maybe. But so la vive or something like that.

Hate scrolling the page when you didnt intend in GNU/Linux Ubuntu Distro? Me too!

January 7th, 2008

I am not going to go over all the crap Ive just gone over. Read it here and here.

Just make sure you have these two additional lines and you wont be able to use your touchpad to scroll…mad fantastic:

Option          “HorizEdgeScroll”       “0″
Option          “VertEdgeScroll”        “0″

That works like crazy!

Prevent space bar mis-strikes from changing focus in GNU/Linux Ubuntu Distro

January 7th, 2008

This really burns my bubble like a thing that burns my bubble when it is really burning it. I am like probably the fastest typist on the planet. I shit you not. I can type like 200 MILLION WPM. But then I got this fantastic to the max lappy. It is SO great it has a touch pad and that little pointer thing. I LOVE THAT THING! Except that its buttons are right at the lappy spacebar. I’ve tried everything to keep from hitting it. Because once I do..I am such a premo awsomo typerist that when I do hit the mouse keys, I am like 30,000 keystrokes ahead, before I realize it. And that is with me lookin at the screen!

To fix it I had to do all this useless crap:

  1. sudo -s
  2. enter your danged password
  3. cp -a /etc/X11/xorg.conf /etc/X11/xorg.conf.original
  4. nano /etc/X11/xorg.conf
  5. Look for something that looks like this and change it so that the last option is there:
  6. Section "InputDevice"
    
            Identifier      "Synaptics Touchpad"
    
            Driver          "synaptics"
    
            Option          "SHMConfig"             "true"
    
    EndSection
  7. You proprobably should keep the rest of your settings the way they already are. X11 is stupid and prone to feckups all over the friggin place.
  8. Then do some crazy commenting stuff like this #I did this crazy thing cause some dumb blog told me to. Be sure to put YOUR name and the date. That way you can search and figure out what you changed in that stupid file in the future. If you think it isn’t a stupid file, wait until you feck it all up by having an extra # in someplace and your system is completely unusable. I hate to say it..but I dont have that crap with Windows. And I hate windows! I like doors better. Anyhow that is why you all that .original crap. So you can fix the messups that I am clearly leading you to. YES this is a repeat of the last blog’s #8. NO I AM NOT ANGRY!
  9. Ok I am.
  10. Butterflies…pencil erasers, black spotted owls.
  11. Now that I’ve found my happy place (and you have to right?) we can continue.
  12. Click on SYSTEM
  13. Mouse over PREFERENCES
  14. Click on SESSIONS.
  15. Click ADD
  16. I dont care what you put in the NAME and COMMENT. I put Touchpad in the name and useless crap in the comments. It’s all useless really except:
  17. gsynaptics-init –sm-disable
  18. Restart X with ctrl-alt-backspace. MAKE SURE youve saved your important crap first!

There ya go. Now…instead of being annoyed that the focus keeps shifting cause you are [not nearly] an awsomist typerist like me, you can be annoyed that every time you want to use the mouse you have to click its buttons like twice. A small price to pay to continue your typing un-impeded with the lesser denizens of the denizen holding place.

Turn off TAP TO CLICK on GNU/Linux Ubuntu Distro for Synaptecs Touchpad on Laptops

January 7th, 2008

Alright, I hate the crap out of this for real. I try to move my freakin mouse around with the touch pad..and it decides I have CLICKED. I didn’t click! Did YOU see me click? How about you? No? Neither did I. I even asked my friggin finger..did YOU click? NO? I thought not!

So you have to do this waste of your time crap:

  1. sudo -s
  2. enter your danged password
  3. cp -a /etc/X11/xorg.conf /etc/X11/xorg.conf.original
  4. nano /etc/X11/xorg.conf
  5. Look for something that looks like this and change it so that the last two options are there:
  6. Section "InputDevice"
    
            Identifier      "Synaptics Touchpad"
    
            Driver          "synaptics"
    
            Option          "MaxTapTime"            "0"
    
            Option          "MaxTapMove"            "0"
    
    EndSection
  7. You proprobably should keep the rest of your settings the way they already are. X11 is stupid and prone to feckups all over the friggin place.
  8. Then do some crazy commenting stuff like this #I did this crazy thing cause some dumb blog told me to. Be sure to put YOUR name and the date. That way you can search and figure out what you changed in that stupid file in the future. If you think it isn’t a stupid file, wait until you feck it all up by having an extra # in someplace and your system is completely unusable. I hate to say it..but I dont have that crap with Windows. And I hate windows! I like doors better. Anyhow that is why you all that .original crap. So you can fix the messups that I am clearly leading you to.

Prevent Stupid Crazy Key Repeats GNU/Linux Ubuntu Distro with Gnome

January 7th, 2008

Ever since I updated my system to Gutted Gibbon Ubuntu Friggin 9. Oh something (7.10) I have had to face a really stupid ‘feature’. Certain programs decide that when I click a key once, I am actually wanting it to click like three hundred and fifteen billion times. I shit you not. So a good example of this is FF2.someshit. If I click CTRL-T to open a new tab, my screen will start to go grey as FF uses up all the system resources. Then like thirteen hundred tabs will open. That is annoying enough. But then it will do it a lot when I hit CTRL-W to close A SINGLE tab. Like all my friggin tabs will close. I HATE that crap.

So over the weekend it reached the point of of irritation enough that I made myself do something about it. Here is the fix (simple as crap):

  1. Click your damn mouse. In your case you are probably going to click on the SYSTEM Menu at the top. I am so cool I put that crap in the MAIN Menu. And I got rid of the stupid ‘Applications’ name on that menu. It is just the Ubuntu Logo. How you ask? Do you see a blog post about it on here? No? Then it mean’s I’ve no friggin clue what the hell I did to accomplish that feat. I am just that great.
  2. Move your mouse to PREFERENCES then click KEYBOARD.
  3. Turn off that stupid “Key presses repeat when key is held down” by unchecking it.
  4. VIOLA go to Caribou and buy yourself a hot chocolate..cause now you wont be annoyed with that new OPEN TEN BILLION FRIGGIN tabs at once feature anymore.
  5. FINE! You want to have keys repeat but not have so many tabs?
  6. RECHECK “Key presses repeat when key is held down”. (Why on earth did you listen to me in the first place..this is GNOME after all..NO cancel available…)
  7. Then move the DELAY SLIDER about half way over. If you still get MAD tabs and other crazy crap repeating, move it more to the right. Keep doing this until it stops.
  8. NOTE: Because the problem is intermittent, you might have to leave it at that setting for a few days before the problem resurfaces like a DKRM!*

* Door Knockin Religious Messenger.

Automatic Mounting Windows SMB Shares in GNU/Linux Ubuntu Distro

December 20th, 2007

Alright, first let’s give credit is due. Mounting the CIFS/SMB shares I already knew about, thanks to Canonical tech support. In fact they had actually showed me how to auto mount these shares on boot, but I’ve since lost those. So a search on google provided this link: http://ubuntuforums.org/showthread.php?t=288534

Here are the steps:

  1. sudo -s (yes for some reason folks do not want you to stay in sudo mode. Look….you can exit whenever you are done with the base list of commands….and typing sudo every line is a pain, so just friggin type sudo -s ok?).
  2. Enter your GNU/Linux system password.
  3. apt-get install smbfs
  4. nano /somepath/somefile. (The forum suggestions /root/.smbcredentials but any file readable by root will actually do. In addition they state not to use a graphical editor. I have not verified the accuracy of that statement. I would also recommend against using VI[M] or EMACS, cause both of those are for girls. Just use nano or pico for cryin’ out loud!)
  5. Change the lines in the file to read (dont enter the numbers):
    1. username=your windows username
    2. password=your windows password
  6. Ctrl-x (to exit). When nano asks if you want to save the file, respond y. Then the filename should be whatever you chose above (in our case /root/.smbcredentials).
  7. cp -a /etc/fstab /etc/fstab.original (the -a maintains your permissions…it is a just in case. I use .original, but you can use any freakin thing you want, I dont give a rip..you could even call it fstab.backup…Yes I shit you not.)
  8. nano (NOT vi..NOT emacs see above) /etc/fstab
  9. Add this line:
    • //windows-server/folder /path.to.wherever.the.hell.you.want cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  10. ctrl-x(to exit). When nano asks if you want to save the file, respond y. The file name should say /etc/fstab.
  11. mount /path.to.wherever.the.hell.you.want (same pathname as above..Special note…this path must already exist).
  12. ls /path.to.wherever.the.hell.you.want

If everything went right you should be able to see a nice listing of files. A note on this path.to.wherever.the.hell.you.want, Ubuntu folks generally use /media/bla for mounting other items (cds, usb drives, network shares, and such). Often in this case I prefer the mount to just be in my home directory. Do it however you want and don’t take no flack from no one that says otherwise. Well..unless security is an issue, then you might not want it in your home or something. There is probably some stupid caveat to all of this that I do not know…always consider the worst.

Like the other day I had not done so. I had decided that I should have super powers like on that show Heroes. Er…no I mean AMAZING powers ( think the word ’super powers’ is like trademarked by DC and Marvel and I’m in big trouble for using it…ugh..). Ok so amazing powers. So, I wanted to head into work last Saturday. There were predictions of snow, but, I figured..ok I can walk into work and just fly home. I mean, simple enough, they do it on TV all the friggin time right? So would my AMAZING flight powers work Saturday? Of course the frag not. Luckily a friend drove me home. But I mean for cryin out loud! this crap never works when I want it to!

So think of your new fstab skills like my flying super..ugh..AMAZING power thing. I figure it will probably work, but maybe it leaves like this huge friggin black hole in your system that can just make your data disappear or some crap. And honestly, why are you trusting me to your data setup anyhow? Just read the Ubuntu link above. Then, if something goes wrong, you can blame them. Don’t say I didn’t warn ya, ya bastard!

Nirbub

December 19th, 2007

Nirbub, mornin right hand one key left.

40 lbs heavier (NSF WCHORCOLLEGE OK FINE MAYBE COLLEGE! GIVE A GUY A BREAK OK!)

December 18th, 2007

Or something. I am not entirely sure. Wait, no, it’s 70lbs heavier. Or 3o lbs and 16 ounces. Ok hold on a second while I recalculamate. Let’s see last I recall I was 20, or 18…yes and 105lbs. Now it is 40 and…what..no dear lord! 170..or maybe 165…for..yes 164.
Ok tell y’all what. Ima go into the office tomorrow and do that officially. In the meantime we will go with the 120lb number. Works for me. Any objections? I thought not.

So tonight I had a splendid 40th bday. Tried my first um…ok spelling.. I could look it up but it is that Jose quervo thing..I think I have that part spellded right. Stampers was the venue. Couple of friends, fine conversation, some kind of video game where you rolled some ball down some wood thing with some kind of something that you knocked over. Dude! It was a blast..I had thought not, but I thought wrong. Trust and believe!

Had a friggin BLAST! Thanks Joe and Rob! (Thanks Katie for lettin Joe go). Then I walked home in the cold. Dude! That Jose thing keeps you warm as…um…well just warm ok! On the way I listened to this little blue light thing. It was connected without even wires! (I shit you not) to some things I hung around my head that were pokin in my ears. I hear crazy shit like, Lorenna Mckinnet and the goddess herself um….ok I can see her in my head..but I cannot think of her name right now. She sings this awesome song and that other awesome one…Trust me it is awesome.

Ok so then I got home right. And of course the cats wanted attention. Like HELLO! I am trying to get my blog up…So I had to pet the little bastards. (Ok they ARE cute..I admit) SHITE! It is according to my lappy 12:o1.. but since it is like 10 minutes ahead we will say it is um..why yall spect me to do math at this hour…HONESTLY!

Yes..there ya go my first (of many) worthless posts….

So there,

Signed…or not. something. I think. Maybe..of that I am positive!