An interesting article about creating a table filled with dates and any special meaning they might have to help generate reports. This will be helpful for a project I'm working on.
I'm working on a report that can have over 100 JavaScript generated graphs on it and in order to reduce the time it takes for the page to render the first time I set it up to create the graphs when they're scrolled to. It turns out that this doesn't work to well when you try to print the report (I'm not sure how that will be helpful) so I had to figure out how to generate the graphs before the user attempts to print the report.
Stack Overflow had the answer for me:
http://stackoverflow.com/a/11060206/4437
It still takes a little while to generate the print out but it's a lot easier to work with.
I think this would work well with lazy loaded images as well.
While I was working on the previous post I accidentally messed up half of the files that I was trying to fix. I had one copy of the file and I needed to copy it to the original files. cp support copying multiple files to the same location but not the reverse so I had to rely on something else.
The line below will copy one file to multiple locations when the original file still exists:
find . -name FileName.php | grep library | xargs -n 1 cp /path/to/original/FileName.php
As always with posts that could mess up data, I take no responsibility for any lost data. I suggest you run this on a single file first to make sure it doesn’t have any unattended consequences and backup anything that’s going to be changed.
I ran into an interesting problem at work today. We have 50 copies of the same PHP file (we have a server that contains historical versions of our site so people can see what the site looked like at a point in time) and I needed to fix a single line in all of them. This is an easy problem to fix with sed but we had two files with the same name in two different directories. To fix this I had to do a slightly more complex search for the files before we replaced them:
find . -name FileName.php | grep folderName | xargs sed -i 's/originalText/newText/g'
As always with posts that could mess up data, I take no responsibility for any lost data. I suggest you run this on a single file first to make sure it doesn't have any unattended consequences and backup anything that's going to be changed.
An interesting video that shows what happens when you upload, download, and then reupload a video to YouTube. It really shows how lossy compression slowly degrades the quality. I remember seeing someone do something similar with a jpeg before.
[embed]http://www.youtube.com/watch?v=icruGcSsPp0[/embed]
I loved View Helpers in Zend Framework 2 so it's nice to see their easy to use in ZF2 as well.
http://zf2dev.com/2013/03/19/how-to-write-custom-view-helper-in-zend-framework-2/
The question I want to raise is whether branching and merging are good tools for an agile development team, or a nuisance.
IMHO, the short answer is nuisance, which is why I push to merge back into the main line at least once a day and try to push/pull just as often.
Branches are inherently about creating isolation
I also agree with this statement which is why feature toggles are an excellent way to create new features without allowing them general adoption.
http://www.grahamlea.com/2013/11/git-mercurial-anti-agile-continuous-integration/
A blog post about using SASS to extend the Bootstrap classes in order to reduce the amount of technical dept we add to a project.
As someone who started a project using Skeleton, then switched to Bootstrap 2 and am now making the transition to Bootstrap 3, I can see where this would have saved me a lot of time. Another reason SASS and CSS preprocessors in general are awesome.
For my day job I work on a PC laptop (at home I've been using a Mac laptop) and for my work projects I've started using GitHub for Windows. Mostly because I don't have to upload a new public key every time I create a new VM (or copy the private key and public key to the VM) but it also make common tasks easy and there is a spell check. The one downside is that my VMs are all Linux and the execute permissions I set in Linux don't carry through to the git permissions and cause problems when I add an executable or script and then assume that the server will get the correct permissions.
The solution to this is to use git update-index.
git update-index --chmod=+x path/to/the/file
I wish I could say I haven't done the third, fourth, and fifth comments before but that would be a lie. I really hate it when I forget to save a file and have to repeat the last commit with a note that says I forgot a file.
subscribe via RSS