Dell 2408 service menu

24 May

This is not web related in any way, but after almost a year with this monitor, I found out how to get into service menu:

  • Turn off the monitor
  • Hold the `menu` key and `+` key pressed and turn the ‘monster’ back on
  • After it’s on, release all buttons then press `-` key. A huge menu will be displayed in top left corner

Ok, so? What can you do with this? You can set some stuff that you usually can’t. Do this on your own risk :D

Tags: Comments (0)

Bookmark this article!

Del.icio.usDiggStumbleUponFurlRedditTechnorati

SlashDotWindows LiveYahooGoogleFacebookBlogLines

Recovering after a crash of e-texteditor

2 Feb

Even the best software have troubles sometimes. Today i will show you how to survive after a crash of E-texteditor (i survived twice so, you can do too :P ).

For various reasons, E-text can crash or just hang when you want to save (especially when you work remotely, via FTP) and can ruin the work of a whole day (or even more) because when saves, the editor will first empty/remove current file, then will write the new one. And if the editor crash just after file is removed, you are screwed. Or, at least, you think so.

Whan you need to do:

Grab a small and fast editor. My pick is Scite. Is small and is DAMN fast with huge files.

Hit your WIN+R on your keyboard and write this: %appdata%\e\temp. Then dragg all files in Scite. Here you can find all recently edited files (may be many files, on my pc there is around 30 or so). Now, all you need to do is to find the file you was saving when the editor crashed. I know, it may be hard, but i can bet is not harder than rewritting your whole file ;)

Bonus tip:

Older version of E-texteditor was somehow unstable in various circumstances. And because i use E since 1.0 or so, i had to develop a good habit: backup my settings. For doing that i use Sync Toy 2. Every night i close my editor and every morning synctoy will copy my settings on another partition, just in case. It’s VERY important to close the editor before backup, because most settings (like ftp accounts) are saved when editor closes. So, unless you want your backup to be useless, please, close your editor :D

Bonus tip 2:

From time to time, visit e-texteditor forums. Most new versions don’t hit the front page if they are not well tested. Live example: on homepage, the last version is 1.0.30 and on forums is 1.0.31 (which is way more stable). So.. Keep an eye there!

Tags: , , Comments (5)

Bookmark this article!

Del.icio.usDiggStumbleUponFurlRedditTechnorati

SlashDotWindows LiveYahooGoogleFacebookBlogLines

Get organized!

11 Dec

Here is a very nice trick that you can use to make your own subdomains on… localhost. I know, it sound difficult as hell but, in fact, it’s easy as hell :D

In this mini-tutorial i assume that you use Xampp, but you can use with any other *AMP configuration, on any platform (Windows, Mac, Linux, whatever). Also, because i don’t own a static IP (my ISP is “kind” enough to change my IP every single time when i power up my PC), i use a dynamic DNS service. Ofcourse, you are not restrained to use this service, you can find plenty of similar sites, but i use this and i’m happy with it :P

Anyhow, let’s begin.

Step 1. Edit httpd.conf

If you use Xampp, and you installed with default settings, you will find httpd.conf in C:\xampp\apache\conf. On httpd.conf you need to find Include conf/extra/httpd-vhosts.conf. If this line have a “#” char, just remove.

Step 2. Edit conf/extra/httpd-vhosts.conf.

This is the fun part. Just add at the end of the file this lines:

<VirtualHost *:80>
	DocumentRoot G:/htdocs/mysubdomain
	ServerName mysubdomain.iamntz.selfip.com
</VirtualHost>

Then save and restart your apache server. Guess what? Now you have a subdomain!

Step 3. Assets folder

In a previous article i showed you how to put all libraries in same folder to avoid too many folder. Of course, this is fine when you don’t use subdomains. But what to do when you use? Well.. You edit httpd.conf !

First of all you need to be sure that Mod_alias.so is loaded. Find LoadModule alias_module modules/mod_alias.so and be sure it doesn’t have any “#” in front. Then add this at the end of the document:

AliasMatch ^/assets(.*) G:/htdocs/assets$1

Don’t forget to save and restart your server.

Next step is… There is no next step! You are ready to start/resume your regular work :P

Enjoy!

Tags: , Comments (3)

Bookmark this article!

Del.icio.usDiggStumbleUponFurlRedditTechnorati

SlashDotWindows LiveYahooGoogleFacebookBlogLines

How do you format your code?

28 Nov

I’ve been asked few times how do i format my code. I try to stick to a easy to read and understand style. Sometimes i do, sometimes i don’t. Let’s talk first about those times i do :D

CSS Code

Each child is indented with a tab. So, i have this style:

1
2
3
4
5
6
7
8
9
#header {
 
}
	#search {
 
	}
		#search button {
 
		}

When you read only CSS you know that #header is the parent, #search is his child and the parent for button. Easy to read, easy to understand, right? :P

I try to avoid code like:

#parent #another_parent #header #search button { }

Because is kinda bogus.

I saw some guys who wrote their code on single line, without any indentation. Even if you have a less KB file, the result is hard to read and edit. Even though, i use very rarely one line code when i have to add one-two rule to a selector ( something like .element { color:red } ).

HTML Code

Actually… Somehow, i have same rule here: every child have a one tab indent:

1
2
3
4
5
<div id="header">
	<form action="" method="get" class="search">
		<button type="submit">Button</button>
	</form><!--/.search-->
</div><!-- /header-->

As an extra info: when i have large blocks of code (div, forms), on closing tag i add a comment with the id or class name: if the block has a class, the closing comment is /.class name and if is an id /id name

Again, easy to read and to maintain, especially when you reuse some of your code.

Javascript/jQuery Code

Well.. Probably is already clear enough how do i do:

1
2
3
4
5
6
7
8
9
10
11
function function_name() {
	var someVar = 1;
	if( someVar === 1 ) {
		alert('someVar is 1!');
		for(i=0;i<10;i++){
			alert(i);
		}
	} else {
		alert(':(');
	}
};//function_name

Conclusion

The main keywords are: indent and comments. You don’t have to overuse indent, because the code will be impossible/hard to read. Also, don’t over-comment your code. Don’t comment the obvious :

var foo = 'bar'; // the 'foo' get 'bar' value

Well.. I can’t say nothing else but „happy coding!”.

Tags: , Comments (6)

Bookmark this article!

Del.icio.usDiggStumbleUponFurlRedditTechnorati

SlashDotWindows LiveYahooGoogleFacebookBlogLines

Which selector is faster?

29 Sep

If you have any concerns about performance of your web application, you probably should read this. Some times ago i read on a site (don’t remember which, was like AGES ago) that a good performance improvement is to be VERY specific when you use a library to select an element from the DOM. That article was written with Prototype in mind but i’ve though that will work same for jQuery as well. HUGE MISTAKE!

Kinda obviously, jQuery is NOT Prototype and they seems to NOT work in the same manner. Today i think to test the results of various selector. For this, i used Profiler from Firebug (what? you don’t know what firebug is?). And i was amazed. And i mean AMAZED!

I made this test right on this blog. I used jQuery('li') in console and, after that i used jQuery('ul li') (there is 24 LI elements on the first page). Until today i think the second option is faster. Why? Well.. Is more specific, isn’t it?

The second pick is around 2.6 times SLOWER than first one. (0.533ms vs 0.205ms).

Unfortunately, i’ve try to use the slower technique on many projects. But, lucky me, for no reason, i always forgot to do that (and i use to remember too late) :D

So, be careful! Don’t make this mistake ;) If somebody will tell ya that a method is faster, DON’T take his word as a law. TEST IT!

Tags: Comments (3)

Bookmark this article!

Del.icio.usDiggStumbleUponFurlRedditTechnorati

SlashDotWindows LiveYahooGoogleFacebookBlogLines

Older Posts »