Exit 12

All I'm Saying Is…

The Perfect Dev Environment?

Hey all,

I have decided to undertake the task of packaging a custom eclipse distrobution. Also included I’m going to package a VMWare appliance server for debugging and all that good stuff.

So far here is the list for the eclipse side:

  • Zend Studio 7
  • Flex Builder 3 Beta
  • MyLyn
  • JS Eclipse
  • Sub Eclipse

And here is the list on the linux vmware side:

  • Fedora 11
  • PHP 5.3
    • apc
    • curl
    • gd2
  • Subversion
  • MySQL 5.1
  • Postgres 8.4
  • SQLite 3.6
  • Zend Studio Community Edition (Free Edition)
  • SQL
  • Samba + Swat
  • NFSv4

I’m also planning to create a simple web interface for the vmware image, we’ll see thou.

So Stay tuned for more details, and of course for the actual distro…  Also if you can think of any good ideas, please leave a comment and I’ll see what I can do…

Mounting a network share with net use

A easy way to mount network drives from either a windows box or a linux samba share is to use the net use command in your cmd.exe prompt.

  1. Open your run prompt by holding down your windows key + R
  2. type in cmd

net use g: \\hostname\shareName

You can substitue the drive letter g with any open drive letter on your system. the hostname can either be a hostname or an ip address like this.

net use g: \\192.168.1.100\shareName

You then should be prompt to enter a username and password if the share is password protected. If everything works correctly then you should get the “The command completed successfully.” message and you should now see your drive show up under “My Computer”

Using Tar

Tar is format of choice for archiving and compressing files on linux. It’s pretty simple.

Creating a Tarball

tar -czvf test.tar.gz test

tar -cjvf test.tar.bz2 test

Unpacking a Tarball

tar -xzvf test.tar.gz

tar -xjvf test.tar.bz2

  • c = create
  • z = gzip
  • j = bzip2
  • v = verbose
  • f = file
  • x = extract

You notice I give two different options, the difference is czvf vs cjvf, which is just the compression method. I usually use gzip, but both are pretty close to each other. From what I’ve heard bzip2 will give you better compression (about 15%) but is a little slower at compressing and decompressing.

Finding Files in Linux

There are two ways I now how to find files, I like to use updatedb/locate the best, but the find command is more commonly installed.

updatedb / locate

updatedb

locate testfilename.txt

find

find -name testfilename.txt

updatedb /locate is much faster because it uses a database to cache all the files on your system, but it needs to constantly be updated either manually or by cron. Where as find is much slower but also is up to date.

Pastebin.org Is Back!

We just got the sourcecode uploaded and running on our new server, we plan to start making some upgrades to the pastebin.com scripts and hopefully add to an already great development tool.

How To Create a Subversion Repository and Trac Project

Subversion is the shit!

It allows you to seemless cover your own ass… It is also very useful for transfering, and updating code. Trac is also very cool, it has one of the best bug tracking sytems, a cool wiki, and a subversion browser. Here is a tutorial about how to setup these up on a fedora/redhat server… It’s pretty easy…

[Read the rest of this entry...]

Skyseek’s Website Goes Live!!!

We have been very busy at Skyseek Consulting. On the side thou we have been working on a website where we can show our projects off, and we even plan to have a small library of software for sale. Starting off with the Skyseek Host File Editor. The next planned piece of software will be our homebrew framework Plex which we think has lots of potential.

Anyways, check out our new site when you get a chance…

helloWorld()

This is my first post on the new blog, the old one died in the server crash of 2008… Sad Day…

What you will learn to expect from this blog is a lot about high end technology, some coding insights, and a lot of propoganda. I’ll try to keep a post a day pace going, but we’ll see.

I also will be posting a tutorial every now and then, so if you have any tutorial requests feel free to slap the whip and I’ll try to ablige.

I’ve been able to find most of my old posts using the way back machine, there is almost a 2 year gap, but a lot of them can still be useful to some of you mofo’s!

Javascript Include Function

I’ve been messing with javascript pretty heavily for a couple of years now, and one thing that has always bothered me is I can’t include script with javascript. I previously used dom to create the script tags, and for css the link tags. The problem with this is that, the new script you create isn’t parsed until after your current script finishes. I had a thought though and here is what I came up with.

The Function

function include(jsFileLocation) {
     if(window.XMLHttpRequest) {
          var req = new XMLHttpRequest();
     } else {
          var req = new ActiveXObject(”Microsoft.XMLHTTP”);
     }

     req.open(”GET”, jsFileLocation,false);
     req.onreadystatechange = function() {
          if (req.readyState == 4) {
               window.eval(req.responseText);
          }
     }

     req.send(null);
}

Example Included File (speaker.js)

var speaker = {
     say : function(what)
     {
          alert(”Speaker Says ‘” + what + “‘”);
     }
}

Example Usage

include(’speaker.js’);

speaker.say(”Hello World”);

Ok so as you can see we are just using basic JSON principles loading the javascript in and running window.eval instead of just eval, reason for this is you need to evaluate the javascript on the top level otherwise your other toplevel code won’t be able to use it. Also you might wonder how we can just run the code immediately after sending the ajax request. The trick is the third parameter to open(). Its a boolean used to set weither the ajax should be asynchronous or not. In our case we want it to not be. That way, javascript holds further code execution untill the included file is loaded and parsed.

By the way, I’ve tested this so far with Internet Explorer, Firefox, Safari, Chrome, and Opera.

rpmbuild -ba this_should_be_easier.spec

Anybody who has installed a application that has 30-50 dependencies with yum will say it was as easy as saying yes, trying to install the same without yum and just the rpm files is a more tedious of a task but still easy, and if you installed the same from source your in for a couple days of work. repositorys and rpms make life easy and also add definitions of the files being installed, so if you ever need to uninstall it is as easy as “rpm -e $programName”. I’m going to run you through some basics on how to create a rpm and then how to create a yum repository, this is great for those like me who need to have a common library of software on all my servers.

[Read the rest of this entry...]