Just a quick update.. I assure you this site is still active :) I’m currently extremely busy but I have lots of cool things coming up.. arduino based notification system with REST service, technical project management ideas, gitflow, and mindful programming technique.. nice.
I’ve often had issues with character sets getting muddled up.. generally from my clients pasting ISO-8859-1 special chars into my sites that are UTF-8. Today I discovered the super-handy iconv() function that’ll convert character sets.. in this case I needed to drop down to ascii for generating pdfs with dompdf:
$output = iconv('UTF-8', 'ASCII//TRANSLIT', $string); Pretty handy!
This always ends up being a bit tricky, and some guides I’ve found on the net differ slightly from what I’ve got here. This seems to work pretty well for me on Debian.
Enter the following into /etc/sshd/config to allow sftp and to lock a user into a specific chroot’ed directory:
Subsystem sftp /usr/lib/openssh/sftp-server For each user you want to lock down, you’ll first need to add the user, set the shell to false so they can’t log in via ssh and then set their home directory to where you want them chroot’ed:
A lot of sites will tell you to do this:
CREATE TABLE t2 SELECT * FROM t1;
Problem is that you’ll lost your auto_increment, primary key and any other indexes you have (and any other extra meta data like that.)
This might not be the best solution, but hey it worked for me:
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 SELECT * FROM t1;
Hope that helps somebody.. I only noticed I’d lost all my primary keys after copying a load of tables using the old method.
For about a year I noticed that very infrequently my VPS would run out of memory.. at first I thought it was probably just a wordpress plugin, but after a while I discovered it was actually saslauthd. This is a known bug (not known very well though..) with saslauthd on Debian. Anyway, here’s the fix - I’m not totally sure of the implications, so if you run a busy mail server I’d recommend you look into it a bit more before doing it:
I’ve just started to learn a bit of ActionScript for a new project I’m working on. The first thing I needed to do was integrate a message from the source html (and eventually a php file.) Turns out there’s pretty much no clear documentation out there on the web, so I decided to write this.
First thing’s first, create a text object in your flash file and set the instance name to something you can easily remember, in this example I set it to message.
Recently I’ve started having to work with sites hosted on shared hosting with phpMyAdmin and a measly 2MB upload limit for database imports. To get around this issue, I found a great little tool called bigdump which can just import a mysqldump file (even if gzipped) - just upload via ftp and import! Pretty sweet.
http://www.ozerov.de/bigdump.php
Yeah, so I just spent about an hour trying to figure out why javascript had stopped working.
<script src="blah.js" type="text/javascript" /> will cause some very strange things to happen. You *must* have a closing tag.
<script src="blah.js" type="text/javascript"></script>
I recently upgraded from a WDTV media player to a WDTV Live. The WDTV is just a simple set top box that allows you to play video on your tv, much like an xbox 360 and a whole bunch of other devices. The WDTV live allows you to play stuff over the network which opens up a whole host of cool stuff if you use the mediatomb DLNA server software available for linux (google tversity if you want something similar for windows.