Category Archives: Stories ?

an article that you can learn something in it….

new project : reverse port knocking

I has started a new project called Reverse Port Knocking (RPK).
the details can be read on http://myrpk.wordpress.com. ( closed )
I choose to use java as the language to build the application.

 

The (R)everse Pork Knocking application start of as an assignment project for master degree student.
Then it’s been decided to make it public , so that anyone can download it and play around with it.

Founder : yusrul
Co-founder: hafeez

* Fouder == founder of this blog.

Basic RPK

Reverse Port Knocking or RPK developed using java. Consist of 2 programs, server and client.

The server will open 1 port (e.g : 5000) when running and waiting for the client “connection” using the port sequences

from the client (e.g: 3000, 4000, 5000).

If the sequences is correct, the server will execute custom script or run a program on the server side.

project started !

myrpk is all about port knocking application developed by me and my friend using java.

the project has started on  21 Jan 2012 and the source code has been uploaded in bitbucket.org under rpk name.

 

p/s: “I” == 2 peoples.

Advertisements

Git ? my new tools

What Git is, why you would want to use it and where to get it and learn about it.

 

Git is a fast, open source, distributed version control system that is quickly replacing subversion in open source and corporate programming communities.

 

version control system

First off, Git is a version control system, a simple command line tool for keeping a history on the state of your source code projects. You use it as you might use something like Subversion, CVS or Perforce.

You tell it to track files in your project and periodically commit the state of the project when you want a saved point. Then you can share that history with other developers for collaboration, merge between their work and yours, and compare or revert to previous versions of the project or individual files.

As it is primarily a command line tool, most of the examples in this course will show the command line versions of the functions. We will be using a recent version of Git (the 1.7 series) for the examples in this course. We recommend upgrading to the 1.7 series if your version of Git is older – there have been a number of UI improvements that make Git a bit easier to use.

$ git --version
git version 1.7.1

If you need help with any of the commands, you can type ’–help’ and it will show you the man page. You can also type ‘git helpcommand’ for the same thing.

$ git log --help
$ git help log

open source

Git is an open source project, that has been active for several years and is written mostly in C.

Git Language Breakdown

At any time you can get the full source code to analyze or improve upon. To get a download of the source code, visit git-scm.com/download. Git is licensed under the GNU General Public License.

offline and fast

Git is fully distributed, which means that it can work almost entirely offline. In stark contrast to VCS tools like Perforce or Subversion, Git does nearly all of it’s operations without needing a network connection, including history viewing, difference viewing and commiting.

This also means that Git is very fast compared to those systems partially due to the fact that none of these operations has any dependency on network latency. For example, take a look at how fast the simple ‘log’ command takes to run in Git and in Subversion.

[master]$ time git log > /dev/null

real	0m0.352s
user	0m0.300s
sys	0m0.034s

$ time svn log > /dev/null

real	0m3.709s
user	0m0.482s
sys	0m0.168s

Git at 0.3 seconds vs Subversion at 3.7 seconds. That is a difference of a full order of magnatude. You’ll find similar differences with nearly any command comparison. For example, adding the popular famfamfam icon set and committing them. Since you can seperate the commit from the network ‘push’ in Git, this action takes a quarter of a second in Git, but 45 seconds in Subversion.

time 'git add icons; git commit -m "added icons"'

real	0m0.273s
user	0m0.032s
sys	0m0.008s

time 'svn add icons; svn commit -m "added icons"'

real 	0m45.276s
user	0m15.997s
sys	0m5.503s

Even if you needed to push to a shared repository at that time as well, it still takes far, far less time than Subversion.

time git push

real	0m6.219s
user	0m0.023s
sys	0m0.011s

If you just want to commit and keep working, you’re looking at a huge time difference – one that severely changes your workflow. Most commands in Git seem instantaneous – no more typing ‘svn commit’ and then going for a cup of coffee.

small (vs svn)

Git is also very space efficient. For example, if you import the Django project from SVN into Git and compare their checkout/clone sizes, Git comes out very favorably.

$ du -d 1 -h
 44M	./django-git
 53M	./django-svn

Interestingly, it is even smaller than the Subversion checkout, which is pretty amazing, considering that the Git clone contains the entire history of the project – every version of every file back to the first commit, whereas the Subversion checkout is just the last version of the project.

snapshots, not changesets

Unlike most other VCSs, Git is snapshot based. That is, instead of thinking about and storing commit points as file based patches or changes, it stores it as a simple snapshot of what your project looked like when you committed.

Commits, then, are simply objects that contain some metadata about the commit (the message, author, date, etc), a pointer to a single snapshot of the project and pointers to the commit(s) that came directly before it. Git’s commit history and data model is really just a directed graph – a simple series of snapshots.

Git Data Model

Keeping this in mind is helpful when you’re thinking about what Git will do in a given situation.

For a more in-depth examination of how Git stores data, checkout Git for Computer Scientists.

cheap branching and easy merging

Probably the most compelling feature of Git, since it often fundamentally changes the way that many developers work, is Gits branching model. Instead of the popular VCS branching method of simply cloning into a seperate directory for a branch, Git lets you switch between branches in a single working directory. Add to that the fact that creating and switching between branches is nearly instant, not all of your branches need to be shared, and it’s easy to stash partially completed work – means that the way you work can be incredibly different.

Instead of only having branches for major development line departures, Git developers routinely create, merge and destroy multiple branches a week, or even per day. Often each feature or bug you are working on can have its own branch, merged in only when it is complete. This model allows you to experiment quickly, easily and safely – without having to go through hoops to get back to where you where. It enables and encourages a non-linear development cycle, where you can work on multiple lines of thought in parallel without them stepping on each other.

Many developers feel that this is so incredibly helpful and has changed their workflow and productivity so much that they dub it the“killer feature” of Git.

 

this article are not written by me and it’s not copyrighted for me.
please refer to reference to know more about the real author.
–reference : http://learn.github.com/p/intro.html

20 Unchangeable Rules in ANY OFFICE

20 Rules in any office

1. The Boss is always right.

2. If the Boss is wrong, see rule 1.

3. Those who work get more work. Others get pay, perks, and promotions.

4. Ph.D. stands for “Pull Him Down”. The more intelligent a person, the more hardworking a person, the more committed a person; the more number of persons are engaged in pulling that person down.

5. If you are good, you will get all the work. If you are really good, you will get out of it.

6.. When the Bosses talk about improving productivity, they are never talking about themselves.

7. It doesn’t matter what you do, it only matters what you say you’ve done and what you are going to do.

8. A pat on the back is only a few centimeters from a kick in the butt.

9. Don’t be irreplaceable. If you can’t be replaced, you can’t be promoted.

10. The more crap you put up with, the more crap you are going to get.

11. If at first you don’t succeed, try again. Then quit. No use being a damn fool about it…

12. When you don’t know what to do, walk fast and look worried.

13.. Following the rules will not get the job done.

14. If it weren’t for the last minute, nothing would get done.

15. Everything can be filed under “Miscellaneous” .

16. No matter how much you do, you never do enough.

17. You can do any amount of work provided it isn’t the work you are supposed to be doing.

18. In order to get a promotion, you need not necessarily know your job.

19. In order to get a promotion, you only need to pretend that you know your job.

20. The last person that quit or was fired will be held responsible for everything that goes wrong.

 

reference : somewhere on the internet… a blog..

ajax vs iframe

Should you use the old iFrame tricks or the new XMLHttpRequest? There is not better or worse when comparing these two techniques, but they are certainly different. While both of them allow you to communicate with the server in the background, you should choose the appropriate for your situation depending on a few questions: Do you want the back-forward buttons to work? Do you plan to perform more than one simultaneous request? Do you need cross-site calls? Do you need to monitor the status of your calls?

I’m pretty sure there are more differences, and way around the ones I will mention for either technique, but out of the box, here are the differences:

  XHR iFrame
Multithread yes no
Back button no yes
Cross-site no yes
Statuses yes no

Some people use iframes because it’s easier to monitor… all you have to do is to show the hidden iframe and voila, you see the responses. On the other hand, I use several http traffic sniffers that give me even more accurate information, and they’re extremely easy to use. So that’s not a plus for me.

Multithread is huge… you could achieve this with iframes if you create a framework that will create a new iframe using dom, use it for the call and delete it once it’s completed. When using XHR, you can easily create a new remote request with simple scripting.

The back button breaks by default when using XHR. Sometimes it is actually good, f.e, if I populate a city and state using a zip code, or check if an email has been taken prior to submitting a form I wouldn’t like to add a history step, so I’m glad the back button doesn’t recognize that request. There are ways around it too if you do need it to work. I will post some solutions/possibilities soon.

Cross-site scripting … while you would like this to work to use web services, they do not really work with iframes either. When scripting with iframe you need to explicitly call a function in the parent or top window, so unless you control both sites, this advantage is useless. You can implement a server side web service proxy relatively easy and I would suggest doing that if you need to use WS.

Finally, statuses… with an iframe you do not know in that status your call is. With XHR you have 5 different ones: 0 = uninitialized, 1 = loading, 2 = loaded, 3 = interactive, 4 = complete. They are useful to provide the user with more accurate information.

In conclusion, most of the times XHR is preferable over iframes, but there are cases and cases. Google maps uses iframes, while google suggest uses XHR.

Source : http://ajax.sys-con.com/read/188390.htm

%d bloggers like this: