Howto delete all empty temporary files

Submitted by Tim on 23 Apr 2014 - 19:24

Due to an error my Drupal files folder ended up with 10.000's of empty temporary files like fileDN4n1t To remove all those files in one command you can use find find . -maxdepth 1 -type f -name 'file*' -size 0 -delete Before you try this you might want to try it without the delete command then you will get a list with the files affected -- Oh if you have the same. The error was in Advanged Aggregation module (advagg) and is fixed after an update

Get accurate temperature from LM35 on Arduino - Correctly!

Submitted by Tim on 01 Oct 2013 - 11:12

After using some online examples I noticed that the temperature was always a little off with my weather station at home. Reading to some examples I came across two fixes: - divide the analogRead by 1023 not 1024. There are 1024 values but that includes 0. - Use analogReference(INTERNAL). This gives a higher accuracy. I've combined these two in the following example: Download example

Tags

Use webcam in two applications under Linux simultaneously using v4l2loopback

Submitted by Tim on 20 Aug 2013 - 13:17

For a recent project we wanted to be able to access the webcam trough Adobe Flash but at the same time record the stream as well with VLC. To do this I had to split the video from /dev/video0 to two virtual webcam devices. I used the v4l2loopback and ffmpeg to archieve this. First of all make sure you've installed ffmpeg apt-get install ffmpeg Then load the v4l2loopback to enable two loopback devices modprobe v4l2loopback devices=2 And with the following line I duplicated the webcam.

.htaccess redirect to maintenance - under construction page

Submitted by Tim on 17 Jan 2011 - 10:37

For simple redirect while doing maintenance on websites like upgrades or emergency fixes I put a site in maintenance by adding the next few lines to my .htacces RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteCond %{REQUEST_URI} !(\.(gif|jpg|css)$|^/maintenance\.html$) RewriteRule ^(.*)$ /maintenance.html [R=302,L] Ofcourse change the 123\.123\.123\.123 to your ip address and create a maintenance.html. This .htaccess will still serve images and css normally so you can use them in your maintenance page.

Share printer with Airprint under Linux/Ubuntu 10.04

Submitted by Tim on 22 Nov 2010 - 20:26

Getting Airprint printer sharing to work under linux is fairly simple.

First off all you need to get your printer working under linux using Cups and make sure you have pdf support (apt-get install cupsd cups-pdf). I won't get into detail howto configure cups. This will be different from printer to printer and pretty well described on the internet.

Linux PPTP VPN server install for use with Iphone

Submitted by Tim on 28 Sep 2008 - 17:19

I was looking into getting an vpn connection from my iphone to my server because I wouldn't want to send my email passwords and webpasswords clear over any public WIFI. Setting up an open source vpn connection from the Iphone is fairly simple but there is not much choiche of software. To my knowledge OpenVPN and Openswan are not supported so my choiche came down to: Poptop which is probably not the most secure solution because it's uses the Microsoft protocol which has a few flaws but I figured it would be much safer then nothing and if there is an evil WIFI I would guess they will just go for the easy targets.

My install is a CentOS 5.2 installation but it should work under any fairly recent Linux distribution

Setting Poptop VPN for Iphone is done in just four steps:

Tags

Hiding TextArea border in AS3

Submitted by Tim on 08 Jul 2008 - 17:06

Problem: TextArea shows a border by default Solution: myTextArea.setStyle("upSkin",Sprite); Description: Using a TextArea in actionscript 3 could come in handy as the Flash component adds in a ScrollBar by default. But it also provides some things you might not want there.. One of those things is the border, that is placed there by default.

Tags

Finding windows driver for Vid_15a4&PID_9015

Submitted by Tim on 29 May 2008 - 16:10

For my mac I have the Equinux Tubestick but I guess there exists a lot of similar products with the same chipset. When connecting it to a windows computer it is recognised as a "DVB-T" with Device instance id "Vid_15a4&PID_9015". Google with this information gives a few hits but it is hard to find that it uses a chipset of Afatech Technologies. Windows driver can be downloaden from http://www.afatech.com.tw/EN/support_kind.aspx?CategoryID=1 select the AF-9015

Tags

Darwin Streaming Server 5.5.5 under Leopard

Submitted by Tim on 13 May 2008 - 12:46

Trying to run the Darwin Streaming 5.5.5 server under Leopard will not work. If you look trough the logfiles you will see the following error:

/System/Library/StartupItems/QuickTimeStreamingServer/QuickTimeStreamingServer: line 19:
/usr/sbin/QuickTimeStreamingServer: cannot execute binary file

Somehow this version of Darwin Streaming Server does not work under macos 10.5 (Leopard) this can be fixed by using the binary from an older version. I did the following steps to get it running under Leopard.

Tags

Installing netatalk under CentOS 5 with Leopard support

Submitted by Tim on 02 May 2008 - 15:16

I had a old installation on our personal server of Netatalk withouth encrypted password support. This is fine when you are on your local network and use Tiger but with Leopard this is no longer supported.

I used netatalk-2.0.3

First time I tried to install under centOS5 I got an error

cnid_index.c:277: warning passing argument 2 of 'db->stat' from incompatible pointer type
cnid_index.c:277: error: too few arguments to function 'db->stat'

after some googling I found out that this has to do with support for an outdated Berkeley DB.

Tags