2009
12.14

Well, “perfect” might be a little exaggerated although I consider this a good configuration at the moment.
You can put this globally into your httpd.conf or separately in every vhost configuration file you need it.

1
2
3
4
5
6
7
8
9
10
11
12
 
<ifmodule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css "access plus 1 month"
        ExpiresByType text/javascript "access plus 1 month"
        ExpiresByType application/x-javascript "access plus 1 month"
        ExpiresByType application/javascript "access plus 1 month"
        ExpiresByType image/png "access plus 1 year"
        ExpiresByType image/jpeg "access plus 1 year"
        ExpiresByType image/gif "access plus 1 year"
        ExpiresByType image/x-icon "access plus 1 month"
</ifmodule>

Make sure you versionize your JavaScript/CSS to be able to force an update files, in case you change them.
Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<html>
  <head>
 
  </head>
    <title>My Example</title>
    <link rel="stylesheet" href="style.css?version=1"  type="text/css" charset="utf-8" />
  <body>
 
    <p>Some Content</p>
 
    <script type="text/javascript" src="javascript.js?version=1"  type="text/javascript" charset="utf-8"></script>
 
  </body>
</html>

You should also give newly updated pictures new names!

Over and out,
JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
12.12

This is a collection of 40 awesome SPB Mobile Shell Wallpapers (Backgrounds).

  SPB Mobile Shell Wallpapers Vol. 2 (9.5 MiB, 493 hits)



  SPB Mobile Shell Wallpapers Vol. 2 (9.5 MiB, 493 hits)

All credit goes to the artists of the wallpapers!

Click here to get to Vol. 1

Enjoy,
JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
12.04

Every once in a while I’m using one of the freely available JavaScript classes to generate a web2.0ish content rating function. Somehow I felt like creating my own. Of course I don’t wanna hold it back… so… here it is. Enjoy!

Features

  • Fully Customizable
  • Ajax Request
  • Callback
  • Lightweight

Examples

The behavior can be easily changed by customizing following parameters

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        var options = {
          scale: 5,
          initialValue: 0,
          locked: false,
 
          lockAfterRating: false,
          setBackAfterRating: false,
 
          ID: 'example-004',
 
          ajax: true,
          ajaxMethod: 'post',
          ajaxAction: 'ajax-request-processor.php',
          ajaxVariable: 'Rating',
          ajaxAdditional: '&amp;OptionalVar=123',
 
          callFunction: true,
          callFunctionName: 'callbackExample',
 
          starFilled: '../images/star-2-filled.png',
          starEmpty: '../images/star-2-empty.png'
        };
 
        new JaZzStars(options);

Download

  JaZz Stars 1.0.1 - JavaScript Content Rating Class (59.4 KiB, 45 hits)

Changelog:
2009-12-04 – 1.0.1

  • Minor fixes

2009-12-04 – 1.0

  • Initial Release
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
12.03

I just came across a script I have totally forgotten about, which I wrote quite a while ago.
I haven’t managed to write a real documentation so far… anyway… feel free to try it.

All you need to do, is to install php in case you haven’t done it already!

  SRCD/HTTP Synchronizer (1.9 KiB, 46 hits)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#! /bin/php

<?PHP
/*
SRCDS FastDownload Syncronizer 
Version: 1.0
 
Author:
Andreas Glaser (JaZz)
www.andreas-glaser.com
 
*/
############################*
# Variables (DO NOT TOUCH):
#
$Config = array();
$Files = array();
 
############################*
# Configuration (Required):
#
// :: CONFIG
// :: CONFIG ~ BZIP2
$Config['Bzip2']['Enabled'] = true;
 
// Enable or diable bzip2 compression
$Config['Bzip2']['Path'] = '/bin/bzip2';
 
// Path to Bzip2 (default: /bin/bzip2)
$Config['Htdocs']['Delete'] = false;
 
// Determines whether obsolete files in the webdirectory beeing deleted
$Config['Htdocs']['Override'] = false;
 
// Determines if every time you synchonize your directories the file gonna be overriden
$Config['Chmod']['Enabled'] = true;
 
// Enable or disable to set new RWX rights
$Config['Chmod']['Access'] = '755';
 
// Sets the new
$Config['Chmod']['Path'] = '/bin/chmod';
 
// Path of Chmod
$Config['Chown']['Enabled'] = true;
 
// Determines if you like to set a new user for the synchonizes web files
$Config['Chown']['User'] = 'web001';
 
// Owner of the synchronized files
$Config['Chown']['Group'] = 'web';
 
// Group of the synchronized files
$Config['Chown']['Path'] = '/bin/chown';
 
// Path to Chown
// :: CONFIG ~ PATHS
$Config['Paths']['cstrike'] = '/path/to/your/srcds/';
 
// Path to your CounterStrike Server
$Config['Paths']['htdocs'] = '/path/to/your/htcods/fastdl/';
 
// Path to your web directory
$Config['Paths']['syn_dirs'][] = 'maps';
 
// Directoriyto synchronize
$Config['Paths']['syn_dirs'][] = 'materials';
 
// Directory to synchronize
$Config['Paths']['syn_dirs'][] = 'models';
 
// Directory to synchronize
$Config['Paths']['syn_dirs'][] = 'resource';
 
// Directory to synchronize
$Config['Paths']['syn_dirs'][] = 'sound';
 
// Directory to synchronize
// :: Config Check (DO NOT TOUCH)
@exec('whoami', $Output);
if ($Output[0] !== 'root') {
  exit('Error: You must be logged in as root'."\n");
}
file_exists($Config['Paths']['cstrike']) && is_dir($Config['Paths']['cstrike']) or exit('Error: The selected cstrike directory does not exist'."\n");
file_exists($Config['Paths']['htdocs']) && is_dir($Config['Paths']['htdocs']) or exit('Error: The selected htdocs directory does not exist'."\n");
if ($Config['Bzip2']['Enabled'] === true) {
  file_exists($Config['Bzip2']['Path']) or exit('Error: Bzip2 was not found on your system'."\n");
}
if ($Config['Chmod']['Enabled'] === true) {
  file_exists($Config['Chmod']['Path']) or exit('Error: Chmod was not found on your system'."\n");
}
if ($Config['Chown']['Enabled'] === true) {
  file_exists($Config['Chown']['Path']) or exit('Error: Chown was not found on your system'."\n");
}
foreach ($Config['Paths']['syn_dirs'] AS $Key => $Val) {
  file_exists($Config['Paths']['cstrike'].$Val.'/') or exit("\n".$Val.' does not exist'."\n");
}
foreach ($Config['Paths']['htdocs'] AS $Key => $Val) {
  file_exists($Config['Paths']['cstrike'].$Val.'/') or exit("\n".$Val.' does not exist'."\n");
}
 
// :: Do it (DO NOT TOUCH)
echo "\n".'<<< START SYNCHRONIZATION >>>'."\n";
foreach ($Config['Paths']['syn_dirs'] AS $Key => $Val) {
  indexCstrike($Config['Paths']['cstrike'], $Val);
}
if ($Config['Htdocs']['Delete'] === true) {
  indexHtdocs($Config['Paths']['htdocs']);
 
  // :: Delete needless files in htdocs
  foreach ($Files['HTDOCS']['FILES'] AS $Key => $Val) {
    $SubDir = substr($Key, strlen($Config['Paths']['htdocs']));
    if ($Config['Bzip2']['Enabled'] === true) {
      if (substr($SubDir, - 4) == '.bz2') {
        $SubDir = substr($SubDir, 0, - 4);
      }
    }
    if (!isset($Files['CSTRIKE']['FILES'][$Config['Paths']['cstrike'].$SubDir])) {
      unlink($Config['Paths']['htdocs'].$SubDir);
    }
  }
 
  // :: Delete needless directories in htdocs
  foreach ($Files['HTDOCS']['DIRS'] AS $Key => $Val) {
    $SubDir = substr($Key, strlen($Config['Paths']['htdocs']));
    if ($Config['Paths']['htdocs'].$SubDir !== $Config['Paths']['htdocs']) {
      if (!isset($Files['CSTRIKE']['DIRS'][$Config['Paths']['cstrike'].$SubDir])) {
        rmdir($Config['Paths']['htdocs'].$SubDir);
      }
    }
  }
}
 
// :: Sync Directories
foreach ($Files['CSTRIKE']['DIRS'] AS $Key => $Val) {
  $SubDir = substr($Val, strlen($Config['Paths']['cstrike']), - 1);
  if (!file_exists($Config['Paths']['htdocs'].$SubDir)) {
    mkdir($Config['Paths']['htdocs'].$SubDir, 0777);
  }
}
 
// :: Sync Files
$tmp_Counter = 0;
foreach ($Files['CSTRIKE']['FILES'] AS $Key => $Val) {
  if ($tmp_Counter !== 0 && ($tmp_Counter % 4) === 0) {
    echo '.';
  }
  $tmp_Counter++;
  $SubDir = substr($Key, strlen($Config['Paths']['cstrike']));
  if (!file_exists($Config['Paths']['htdocs'].$SubDir.'.bz2')) {
    if (!file_exists($Config['Paths']['htdocs'].$SubDir)) {
      copy($Key, $Config['Paths']['htdocs'].$SubDir);
      if ($Config['Bzip2']['Enabled'] === true) {
        $LastLine = system($Config['Bzip2']['Path'].' -9 '.str_replace(' ', '\ ', $Config['Paths']['htdocs'].$SubDir), $RetVal);
      }
    }
    else {
      if ($Config['Htdocs']['Override'] === true || $Val['Size'] !== filesize($Config['Paths']['htdocs'].$SubDir)) {
        unlink($Config['Paths']['htdocs'].$SubDir);
        copy($Key, $Config['Paths']['htdocs'].$SubDir);
        if ($Config['Bzip2']['Enabled'] === true) {
          $LastLine = system($Config['Bzip2']['Path'].' -9 '.str_replace(' ', '\ ', $Config['Paths']['htdocs'].$SubDir), $RetVal);
        }
      }
      else {
        if ($Config['Bzip2']['Enabled'] === true) {
          $LastLine = system($Config['Bzip2']['Path'].' -9 '.str_replace(' ', '\ ', $Config['Paths']['htdocs'].$SubDir), $RetVal);
        }
      }
    }
  }
  else {
    if ($Config['Htdocs']['Override'] === true && $Config['Bzip2']['Enabled'] === true) {
      unlink($Config['Paths']['htdocs'].$SubDir.'.bz2');
      copy($Key, $Config['Paths']['htdocs'].$SubDir);
      $LastLine = system($Config['Bzip2']['Path'].' -9 '.str_replace(' ', '\ ', $Config['Paths']['htdocs'].$SubDir), $RetVal);
    }
  }
}
unset($tmp_Counter);
if ($Config['Chmod']['Enabled'] === true) {
  system('chmod -R '.$Config['Chmod']['Access'].' '.$Config['Paths']['htdocs'], $RetVal);
}
if ($Config['Chown']['Enabled'] === true) {
  system('chown -R '.$Config['Chown']['User'].':'.$Config['Chown']['Group'].' '.$Config['Paths']['htdocs'], $RetVal);
}
echo "\n".'<<< DONE >>>'."\n";
echo "\n".'| INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|';
echo "\n".'| Script:         SRCDS FastDownload Syncronizer                  |';
echo "\n".'| Version:        1.0                                             |';
echo "\n".'| Author:         Andreas Glaser                                  |';
echo "\n".'| Website:        www.andreas-glaser.com                          |';
echo "\n".'| Creation Date:  2009-01-14                                      |';
echo "\n".'| Last Update:    2009-01-14                                      |';
echo "\n".'|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|'."\n";
 
function indexCstrike($Dir = NULL, $SubDir = 'subdir')
{
  global $Files;
  $Dir = $Dir.$SubDir.'/';
  $Files['CSTRIKE']['DIRS'][$Dir] = $Dir;
  if (file_exists($Dir)) {
    $handler = opendir($Dir);
    while ($file = readdir($handler)) {
      if ($file != '.' && $file != '..') {
        if (!is_dir($Dir.$file)) {
          $Files['CSTRIKE']['FILES'][$Dir.$file]['Size'] = filesize($Dir.$file);
        }
        else {
          indexCstrike($Dir, $file);
        }
      }
    }
    closedir($handler);
  }
}
 
function indexHtdocs($Dir = NULL, $SubDir = 'subdir')
{
  global $Files;
  if ($SubDir !== 'subdir') {
    $Dir = $Dir.$SubDir.'/';
  }
  $Files['HTDOCS']['DIRS'][$Dir] = $Dir;
  if (file_exists($Dir)) {
    $handler = opendir($Dir);
    while ($file = readdir($handler)) {
      if ($file != '.' && $file != '..') {
        if (!is_dir($Dir.$file)) {
          $Files['HTDOCS']['FILES'][$Dir.$file]['Size'] = filesize($Dir.$file);
        }
        else {
          indexHtdocs($Dir, $file);
        }
      }
    }
    closedir($handler);
  }
}
?>

  SRCD/HTTP Synchronizer (1.9 KiB, 46 hits)

JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
11.26

For the best video quality with the default video player, choose following setting in you video converter.
I would recommend to use “Super” which converts almost any format!

Max Resolution: 800×480px
Container: MP4
Codec: H.264/AVC
Bitrate: 768kbs (maybe a bit more)
Framerate: 25

Audio Codec: AAC LC
Bitrate: 112kbs
Frequency: 44100

External Links

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
11.11

Unfortunately Subversion provides no inbuilt function to add all new files at once.
This however is a solution:

1
svn status | grep "^?" | awk '{print $2}' | xargs svn add

Enjoy,
JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
10.27

Q: “Browse flash sites on HTC Touch HD”

A: There is at the moment one browser available for Windows Mobile which fully supports flash. The browser is called “Skyfire“.

Skyfire about Skyfire:

Watch any video
YouTube, Hulu, any web video – you name it – it’s playing on Skyfire. Skyfire is the only mobile browser that supports full Flash and Windows Media videos, including Flash 10 and Silverlight 2.0.

Share instantly
Easily share what you find on the web or what you are up to. Post web pages and status updates to Facebook and Twitter, with one click!

Blazing fast
Skyfire fires up fast and web pages load quickly. Don’t take our word for it, check out this showdown by Laptop Magazine.

Follow your friends’ Facebook and Twitter updates plus keep track of news, sports, video and other content in your own customizable activity feed.
Browse your favorite websites on Skyfire exactly like you do on your PC. No compromises! We’re the only mobile browser to support all major Web 2.0 standards – Ajax, Javascript, Flash 10 – it just works.
External Links
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
10.22

Every once in a while I’m asked how to change file associations in Ubuntu. It’s very simple and explained in two steps.

Step 1
Right mouse click on one of the files you want to associate with a specific program. Select “Properties” from the context menu.
step1

Step 2
Jump to the “Open With” tab, select your preferred software and close the window.
step2

From now on, when you double click files from the definied type, it automatically starts the previously selected software.

JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
10.21

My old domain “zorrox.com” is now officially down.
Most of it’s content is also available here. Try the search bar on the right side!

JaZz

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print
2009
10.20

A few months ago i came across this campaign called “IE6 No More”,
it’s attempt or better yet it’s goal is to erase once and for all, the source of all evil “Internet Explorer 6″. :)

Quote

Why?

Enough is enough. Microsoft Internet Explorer 6 was released in late 2001. For its time, it was a decent browser, but in 2009, it is still in use by a significant portion of the web population, and its time is now up.

As any web developer will tell you, working with IE 6 is one of the most difficult and frustrating things they have to deal with on a daily basis, taking up a disproportionate amount of their time. Beyond that, IE 6’s support for modern web standards is very lacking, restricting what developers can create and holding the web back.

What?

This website is run by a group of people who want to see IE 6 disappear as soon as possible. To help make that happen, we’re encouraging the IE 6 users of our websites to upgrade to a more modern browser, so they can have a better experience using our sites and browsing the web.

How?

Check out the code samples for different styles and languages, or just copy and paste the following code onto your site

Close this notice
Warning!
You are using an outdated browser
For a better experience using this site, please upgrade to a modern web browser.
Get Firefox 3.5
Get Internet Explorer 8
Get Safari 4
Get Google Chrome

This is definitely worth to support.
If you feel like supporting the campaign as well, visit their website and follow the instructions.

External Links

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email
  • FriendFeed
  • RSS
  • StumbleUpon
  • Twitter
  • Print