Archive for the 'UNIX' Category
5.29.08 Colorized SVN STAT and CVS UPDATE Output Via BASH category: UNIX
0
comm

Single line of bash code to output CVS update with colorized:

# cvs -q up -dP | awk '{a["A"]=32;a["C"]=31;a["M"]=34;a["U"]=37;a["?"]=36;printf("\033[1;%sm%s\033[0;00m\n",a[$1],$0)}'
A src/add.cs
C src/conflict.cs
M src/modified.cs
U src/updated.cs
? src/unknown.cs

3.27.08 Load Test AJAX Applications With HTTPERF category: AJAX, UNIX
0
comm

First off - never leave home before launching any site or server architecture without HTTPERF. http://www.hpl.hp.com/research/linux/httperf/
This is the most robust and elegantly simple load testing CLI (command line interface) I’ve yet ever seen or been happy to use. The one feature that is most impressive is the –wsesslog feature:
      –wsesslog=N,X,F
      [...]

12.24.07 mod_cache ignores mod_dir DirectoryIndex index files + workaround category: UNIX
0
comm

An interesting problem with Apache’s mod_cache (even “production” in the 2.2.X branch) is that it does not cache mod_dir’s DirectoryIndex files. For instance, if you have a
DirectoryIndex index.html index.php
declaration, neither of which will be cached by mod_cache. I have only seen this be true for mod_disk_cache but assume it fails with mod_mem_cache as well. The [...]

7.13.07 Simple Flash Remoting Proxy Through Linux category: Flash Development, UNIX
0
comm

I must disclaim that this is a very straight forward proxy example yet it does not work with AJAX and web browser’s cross-domain security policies/complexes. There is actually a far more elegant solution I use currently which enables complete support for Flash Remoting and AJAX calls to be made via a cluster of proxies even [...]

7.13.07 How To Convert Apache SSL Certificate To Use With IIS category: UNIX
1
comm

Disclaimer: I figured this out from other sites and other’s hard work. Not only that but another classic case for how much we take advantage of the amazing functionality of OpenSSL.
To import your certificate to Windows, you will first need to combine your primary certificate with your private key file in a .pfx type backup [...]

4.3.07 mod_proxy and internet explorer problems category: DHTML, UNIX
2
comm

If you have seen this error appear in your Apache logs:
(104)Connection reset by peer: proxy: prefetch request body failed to 10.0.0.2:80 (10.0.0.2) from 10.0.0.2 ()
.. or any error related to what appears to be your mod_proxy declarations failing - as we have - I have discovered two things that will help prevent this issue. This [...]

3.19.07 Problems With Clustered Flash Remoting Through Apache mod_proxy category: Flash Development, UNIX
0
comm

The scenario is having an externally accessible Apache 2.2.4 server providing a clustered proxy for Flash Remoting. The problem I encountered every time I tried to access http://www.myhost.com/_api/flashservices/gateway/ it would access the appropriate clustered proxy node - but that node would immediately send back a 302:Location Redirect which would resolve to a private-network IP address [...]

1.24.07 Canon Network Camera Control Protocol Hack - VB-C50i Control Port Communication category: UNIX
5
comm

UPDATE 10/10/2007 - Put together a very simple Coldfusion script that can control a camera by connecting directly to the cam, taking control of it, and sending binary control data. Here’s the example source:
<!— Access the Java Thread class (for sleep) —>
<cfset thread = createObject("java", "java.lang.Thread")>
<!— Create a default TCP socket connection to the [...]

1.22.07 Live Streaming of a Webcam Feed from CANON VB-C10/C50 From a Relay Proxy Server category: UNIX
22
comm

UPDATE 10/01/2007 found out that if the input from the cam is 6FPS and the output to SWF via FFSERVER is 4FPS - there’s no lag in camera controls. The scripts below have been changed to pull the MJPEG images from the camera at 6FPS and keep the flash SWF output as 4FPS.
The controllable IP [...]

11.8.06 Webalizer shell script that handles clustered logs category: UNIX
1
comm

This shell script utilizes barebones webalizer config files in /etc/webalizer/{NAME}.conf where {NAME} is the value of the somewhat standard hostname-access_log.1.gz with Linux log rotation.
This uses the zmergelog tool (thanks to Bertrand Demiddelaer!) which is readily available via apt-get install zmergelog via the stable sarge repository.
This is very handy when you want to process LARGE log [...]

1.127s