Found this handy command from Stack Overflow to SVN Delete all missing files.
svn st | grep ^! | awk '{print " --force "$2}' | xargs svn rm
I found this from this article:
http://stackoverflow.com/questions/9600382/svn-command-to-delete-all-locally-missing-files
Saturday, January 12, 2013
Monday, January 7, 2013
User-Agent Switcher Extension for Chrome
I came across a pretty cool extension for Chrome today. I needed to switch the user agent of my browser to test an application hack. Apparently, one of our Joomla (aka Doomla) sites were hacked recently with an exploit that showed viagara ads on bot ONLY visits.
The extension is called User-Agent Switcher and it works like a charm. I was able to change my user agent to the google bot so that we could get a reproduction of the issue.
This is a screen shot of the extension in your browser:
The extension is called User-Agent Switcher and it works like a charm. I was able to change my user agent to the google bot so that we could get a reproduction of the issue.
This is a screen shot of the extension in your browser:
Adding Menu Icons in Superfish Module for Drupal 7
I had a project dropped on my lap a few weeks ago. Obviously, It was already behind schedule. One of the features was to implement a dropdown menu with a home icon for the home link. Unfortunately, I found out that the superfish module bypasses the drupal methods for the menus. So, this is how I managed to get it modified. Please note that this is not upgrade friendly. You will have implement this solution again if you upgrade the superfish module. I performed the quick and dirty solution since I was already behind schedule. The better approach would be to override methods in your theme template file.
1) Open superfish.module file.
2) Scroll down to theme_superfish_build method.
3) Add your new logic to the last section of the method where there is concatenation of the output html.
My logic was this:
$pattern = '/\S+\.(png|gif|jpg)\b/i';
if(preg_match($pattern, $menu_item['link']['title'], $matches) > 0)
{
$output['content'] .= '<a href="'.url($menu_item['link']['link_path']).'">'.preg_replace($pattern,'<img alt = "' . $menu_item['link']['title'] . '" src = "' . url($matches[0]) . '" />',
$menu_item['link']['title']).'</a>';
}
else
{
$output['content'] .= l($menu_item['link']['title'], $menu_item['link']['link_path'], $link_options);
}
This logic transforms a url path in the title that contains an image file extension into an image tag. This worked good for my solution, but would not have worked well if all my menu items needed an image. That is because the title would be displayed in other modules such as menu block. I would have needed a much more complicated snippet to handle an entire menu.
Sunday, January 6, 2013
Added Development Environment Setup for Vanilla Ubuntu VM
I created a setup archive for installing the required files and applications for the development virtual machines. I went through this process so that I could easily create a new development environment without having to remember everything that I installed and configured. Now it is easy to go from ground zero to full development. The setup archive is tailored for an ubuntu vm.
https://docs.google.com/folder/d/0B37iWxTxZVl8cFhSVURpdUsyQzA/edit
https://docs.google.com/folder/d/0B37iWxTxZVl8cFhSVURpdUsyQzA/edit
Updated Development Virtual Machines to 12.10
I finally got the virtual machines updated to version 12.10 of Ubuntu. This involved an installation of the operating system in a clean VM and complete reconfiguration. This is because the upgrade from 12.04 to 12.10 did not go as smoothly as I expected. One of the big changes was the removal of the android sdk. I had to do this to reduce the size of the development environments. Got the .ova files down from 7GB to around 3GB.
You can find all of my Java and PHP Development virtual machines at this location:
https://docs.google.com/folder/d/0B37iWxTxZVl8cFhSVURpdUsyQzA/edit
Please review the readme file in the directory before downloading the virtual machines. Thanks.
You can find all of my Java and PHP Development virtual machines at this location:
https://docs.google.com/folder/d/0B37iWxTxZVl8cFhSVURpdUsyQzA/edit
Please review the readme file in the directory before downloading the virtual machines. Thanks.
Friday, December 28, 2012
Drupal 7 Password Reset without Email or UI
I have been building out the new Development VMs that I use for developing PHP websites including Drupal 7 websites. I ran into an issue where the password for the admin account no longer worked. The database was migrated from an older environment.
I found this link that helped me out on resetting the admin password:
You basically can use drush to reset the password easily.
Navigate to your drupal folder and run the following:
drush user-password username --password="new_password"Wednesday, December 26, 2012
Who cares about how many kills you have!
I ended up buying Black Ops 2 for the XBOX 360 not too long ago. The zombies mode has consumed a little bit of my time lately. I came to the conclusion that its a large disappointment. The multi-player modes in the Call of Duty games have become so shallow. The best that I have seen were the Spec Ops for Modern Warfare 3. You want more of those great missions? -- "Pay up son! It will be another $20 for 2 more missions". Mmmmm... good old slice of that corporate greed.
I have been playing video games for over 27 years. It is amazing the contrast of the games back then and the games now. Sure, technology gets better and the action is now more intense than ever.
Unfortunately, there is one thing missing in today's games. Substance.
There was a time that playing video games was fun because the game play and story were fun. There was much more coop play as most of the games were split screen and encouraged coop play. Today, great games with coop play are hard to find.
Most of the games are about the flash and look at all this crazy shit blowing up. I have 530 kills and only 25 deaths. Who gives a shit! What happened to working toward a common goal or making the game ultra fun to play with friends? Its that sense of accomplishment that really gives players that extra push to replay the same game.
My maturity in gaming has taken me past the point of being the best shooter. Now it is about using my time wisely while having the most fun I can have playing. Find it ridiculous that these companies charge so much money over a game that can only be played for a few hours.
That is why I am glad games like Minecraft have been created. I am becoming an advocate for the little guys. The companies that are about building games based on user interaction and game play. Rather than all the fluff. An advocate for affordable prices. Paying for what you should get and not getting ripped off. There is something wrong when a company charges $60 for a game that gets played 20 hrs at the most in comparison to someone who charges $20 for a game that gets played for over 6 months. Hmmmm....
I am hoping that these companies will wake up and listen one day. Unfortunately, the only thing that will make them listen is the boycott of their games. When the bottom line gets hurt. You hear me? Talking to you Activision. Wake up!
Subscribe to:
Posts (Atom)
