Entries Tagged 'Web' ↓

How to set up a remote Git repository

On the remote server:

mkdir repository.git
cd repository.git
git --bare init

On the developer’s machine:

mkdir cool_app
cd cool_app
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin ssh://user@server:port/full/path/to/repository.git
git push origin master

More…

Convert string to integer in Javascript

var s = "1337";
alert(parseInt(s) * 2);

My university has been hacked!

More precisely, the Computer Science Department of EAFIT University has been owned. My mate just showed me its webpage. And all you can see right now is this:

DIS EAFIT owned

H-U-H? err, I mean, K-U-H? What happened here? Then my friend showed me this, the website of the IEEE Medellín subsection (click to enlarge):

ieeemedellin

Googling a little, I found out about who seem to be the responsibles, some dudes who call themselves the Kosova Unknown Hackers. Kosova? WTF? I don’t even know where that is. I think I’m going to found the CCCC and take revenge. The CCCC, you know? Colombian Cocaine Consumers Crackers. We are going to be bad and deface some third world country’s universities’ webpages!

I guess what I wanted to say is that I feel so insecure. Seriously, how come this happens? If this is the security of the Computer Science Department, I can’t image how secure is the site of the Bussiness Management Department.

Time Javascript operations

Sometimes I need to time how long a Javascript operation takes. It’s very easy if you are using jQuery.

   console.time("longOperation");
   for (var i=0; i<1000; ++i){ var j = i*i; } //do something complicated
   console.timeEnd("longOperation");

Then, you’ll see the result in the Firebug console:
Time Javascript operations