andhapp Random ramblings

Fuzzing

Read about this technique of testing called Fuzz testing or Fuzzing whilst reading Zed Shaw’s essay on Ragel, the state machine compiler. It is quite interesting stuff really once you get a hang of it.

Some useful git commands

gitHub is an amazing piece of functionality. The user interface is so amazing that BitBucket simply ripped it off. Yes, without any regrets. I mean people are bound to notice that sort of stuff but still these things happen. Anyways, I came across some really handy git commands and would like to share them and just make a record of it in case I need to refer to them.

  1. git daemon
  2. git instaweb
  3. git shortlog

Parallel or Crossover Ethernet cable

Yeah, I got asked this question when I had to buy some ethernet cable. It sounds very prehistoric to run a cable in this day and age. Perhaps, that is not the point of this post. So, I was saying that I got asked this questions and I stood their thinking “Are there different types of ethernet cables?”. Thanks to “not paying attention” whilst at university. Anyways, that ensued a journey into the world of research.

There are several different types of cables and each fit a specific purpose but I would just discuss two here as they are the most relevant IMHO:

a) Parallel - In a Parallel Ethernet cable, the smaller cables inside the Ethernet cable on both ends will be in the same order of colors, from left to right. It is used to connect the computer to a hub or a router to a switch.

b) Crossover - A Crossover Ethernet cable has different pin points on each side. It can basically reverse the signals the received or transmitted signal. It is used to connect computing devices without the use of a hub or switch.

Right, so which one do I use to connect my computer to a router. Ofcourse, a parallel one. There is a lot of other information related to the ethernet cables and types and standards and if you fancy reading it just google.

Clone bare git

Found an interesting option to clone a git repository. Honestly, speaking I have no idea how it could be usefult because it does not actually do a checkout of the HEAD. Anyways, if you run:

git clone --bare git://github.com/andhapp/decoct.git

then you will have the following directory structure which is quite similar to what’s in your project’s .git folder.

-- decoct.git 
   -- HEAD
   -- config
   -- description
   -- hooks
   -- info
   -- objects
   -- packed-refs
   -- refs

This is what the doc has to say:

--bare : Make a bare GIT repository. That is, instead of creating and placing the administrative files in /.git, make the itself the $GIT_DIR. This obviously implies the -n because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/. When this option is used, neither remote-tracking branches nor the related configuration variables are created.

This is exacly what it does but how would this be useful puzzles me.