If you’re not already familiar with the heartbleed bug, have a look at this website: http://heartbleed.com/ - I don’t want to talk about what it is exactly as lots of people have done that.. just why you should be more worried than you are.
If you were (or still are?!) running an affected version of openssl:
You almost certainly have NO way of telling whether someone attacked your server You may have been attacked through any service using SSL.
So you’ve updated your .gitignore, yet some files (log files?) have changed and git still thinks you might want to commit them.
Try this:
git update-index --assume-unchanged directory/ or
git update-index --assume-unchanged blah/file.log Thanks to SO: https://stackoverflow.com/questions/655243/ignore-modified-but-not-committed-files-in-git
We recently took on a horrible code base at work, with lots of open tags in the code like this:
<? calculateVat(123.. As far as I know this way of opening PHP code is deprecated and soon won’t be supported at all so I thought I’d just use sed to fix this but it wasn’t quite that simple.
Sed has no way of doing look-aheads with regular expressions meaning we can’t tell it to not turn <?
This article was originally written in 2013 and applies to a fairly old model of the WD Mybook Live. The procedure here may well not work for you, please just use it for ideas. Also, check the comments as a lot of other people have tips!
When the WD Mybook Live 3TB NAS was released, I went out and bought one and promptly put all my stuff on it. I have never kept anything *really* important on there as I didn’t have anything to back up all that data on to.
No doubt many others have thought of this already, but today I had a brainwave..
You have forms that use the dreaded captcha, which just sucks. Better forms use a honey pot trap but it’s still a bit weird. What if we checked to see how long a user had spent filling out a form - a bot will take (not much time) to complete the form where as a human being will take slightly longer, say anything over 5s.
Several years ago a new framework called CakePHP was released and I was quick to jump on the band wagon. The promise of having base code that does 90% of the work for you was too tempting and we quickly got burned trying to perform more complex SQL queries - hitting the boundaries of what was possible and having to hack our way around it. Ugh.
Still, when you go back to writing an MVC style web app from the ground up you quickly realise that life would be much easier with a framework.
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: