I was just reading this article and found it interesting. It listed the following as the 5 biggest mistakes made by an LLC:
1. Before the LLC Business Entity is Formed, Don't Conduct Business.
2. Failing to Actually Issue Ownership Interests of the LLC Business Entity.
3. Failing to Create a Management Structure and Appoint Officers for the LLC Business Entity.
4. Failure to Get Investment Obligations in Writing.
5. Thinking that an LLC Business is a Foolproof Layer of Liability Protection.
Saturday, October 31, 2009
Load Balancing Software
I was talking to one of our system admins the other day about load balancing. He suggested I look into HAProxy. Apparently, gifts.com uses this for their load balancing rather than a hardware layer. One of the features I'm looking for is the ability to handle sticky sessions. I didn't see anything about it on the home page, but it's suppose to support it. This is something I'd like to look into at a later time:
http://haproxy.1wt.eu/
http://haproxy.1wt.eu/
List of commands
I ran across a nice page of linux commands. Some of them I already knew, but there were several that were new to me.
http://www.pixelbeat.org/cmdline.html
http://www.pixelbeat.org/cmdline.html
spotlight on the command line
I've recently learned about
You can read up on the command at:
http://macdevcenter.com/mac/2006/01/04/mdfind.html
mdfind on OSX. mdfind is essentially a commandline interface to Spotlight. One of the benefits of using mdfind over locate is that the indexing is done in real time. As soon as the file is added to the file system, it is added to the index.You can read up on the command at:
http://macdevcenter.com/mac/2006/01/04/mdfind.html
Friday, October 30, 2009
Sending screen commands
You can start a detached screen session using the following command:
This will create a screen session named 'myTest'. You can verify it was created with 'screen -list'. You should see something similar to the following when you type that command:
Then you can send commands to the newly created screen session:
You have to type <control-v><control-m> to get the ^M character correctly. This command will essentially type 'top' and 'enter' in the screen session named 'myTest' for the 0th window. When you reconnect to the screen session, you should see top running. You can type 'q' to quit top.
The important part of this command is the -X. This switch can take several different commands. You can see all the commands available at
http://www.gnu.org/software/screen/manual/screen.html#Command-Summary
I found this link to be very helpful.
screen -dm -S myTest
This will create a screen session named 'myTest'. You can verify it was created with 'screen -list'. You should see something similar to the following when you type that command:
$ screen -list
There is a screen on:
31306.myTest (Detached)
1 Socket in /tmp/uscreens/S-mmasters.
Then you can send commands to the newly created screen session:
screen -S myTest -p 0 -X stuff 'top^M'
You have to type <control-v><control-m> to get the ^M character correctly. This command will essentially type 'top' and 'enter' in the screen session named 'myTest' for the 0th window. When you reconnect to the screen session, you should see top running. You can type 'q' to quit top.
The important part of this command is the -X. This switch can take several different commands. You can see all the commands available at
http://www.gnu.org/software/screen/manual/screen.html#Command-Summary
I found this link to be very helpful.
Thursday, December 13, 2007
Validating xml and xsd with xmllint
Recently, I've been going through some tutorials on XSD. I always find the tutorials on W3Schools to be very help and they've come through on this subject. The information on their site is concise and to the point. While going through their tutorials, I wanted to find an easy way of testing what I'd learned. Preferably, this would involve a command line utility.
I found that xmllint provides the functionality I was looking for. I'd like to step through what I've been doing to test my XML/XSD validation.
1. Create the XSD file. I'll use an example from W3Schools. Save the following to a file named note.xsd:
2. Create the XML file. Again, we'll use an example from W3Schools. Save the following to a file named note.xml:
3. Validate the XML against the Schema. You will need to have xmllint installed. I type the following on the command line for validation:
This gives me the following output:
Now that we know what happens for passing validation, I'd like to show you a failing one. Let's change the order of the elements in our XML. This will cause the validation to fail because the order is explicit per our XSD. The following XML switches the to and from elements:
This will give the following output when we run xmllint:
I'm a little disappointed with the error message that I receive, but I think I'll gain a better understanding of them as I use the tool more.
I found that xmllint provides the functionality I was looking for. I'd like to step through what I've been doing to test my XML/XSD validation.
1. Create the XSD file. I'll use an example from W3Schools. Save the following to a file named note.xsd:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
2. Create the XML file. Again, we'll use an example from W3Schools. Save the following to a file named note.xml:
<?xml version="1.0"?>
<note xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com note.xsd">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
3. Validate the XML against the Schema. You will need to have xmllint installed. I type the following on the command line for validation:
xmllint --noout --schema note.xsd note.xml
This gives me the following output:
note.xml validates
Now that we know what happens for passing validation, I'd like to show you a failing one. Let's change the order of the elements in our XML. This will cause the validation to fail because the order is explicit per our XSD. The following XML switches the to and from elements:
<?xml version="1.0"?>
<note xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com note.xsd">
<from>Jani</from>
<to>Tove</to>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
This will give the following output when we run xmllint:
note.xml:5: element from: Schemas validity error : Element '{http://www.w3schools.com}from': This element is not expected. Expected is ( {http://www.w3schools.com}to ).
note.xml fails to validate
I'm a little disappointed with the error message that I receive, but I think I'll gain a better understanding of them as I use the tool more.
Tuesday, April 24, 2007
Tab Completion
Ever since I've used cvs and subversion I've wanted to exclude the CVS directories and .svn directories from the tab completion list. In the past, I've lackadaisically looked for a solution to this. This problem comes up quite a bit for me when I'm inside the directories of a java project. Most of the time people will break their classes into separate packages, which is exactly what they should do. Hence, you get packages like com.ibm.ltc.eclipse.foobar which correspond to a directory structure like com/ibm/ltc/eclipse/foobar. The problem is that all the classes might be in the foobar directory. Most of the time, in a situation like this, it's nice to start above the com directory and continuously hit tab until you get to the last directory. This assumes there's nothing in the other directories. But if you're using subversion, then there's a .svn directory in each of them. This prevents you from using the tab completion as I've described because it wants you to choose between com and .svn. NO MORE MY FRIEND! I finally got a little frustrated with this today.
I use bash, so I used the following in my .bash_profile to solve the problem:
export FIGNORE=CVS:.svn
This will ignore the CVS and .svn directories for tab completions.
I use bash, so I used the following in my .bash_profile to solve the problem:
export FIGNORE=CVS:.svn
This will ignore the CVS and .svn directories for tab completions.
Subscribe to:
Posts (Atom)
