@SnipeyHead tweeted this link out and I found all the videos great. A couple I have seen before, but they were all great to see. This is probably my favorite of the bunch.
Month: May 2011
Git and Git Flow Usage
I saw this image about a successful git branching model. http://nvie.com/posts/a-successful-git-branching-model/
It made perfect sense while looking at the graphic, however implementation proved to be more difficult for me. I am a one man shop, so it is too easy to get confused when I don’t have to worry about other developers.
I then saw a tweet about Git Flow. I didn’t put two and two together that it involved this very image. If you are considering Git and looking for a good routine, definitely look into this.
https://github.com/nvie/gitflow
Why aren’t you using git flow?
Also look at the bash completions, I highly recommend them.
http://github.com/bobthecow/git-flow-completion
I all of a sudden started receiving this error with no clue why. Numerous posts I read told me that I should downgrade from 3.5 to 3.4, which turned out to be a huge P.I.T.A.
The solution, look for the reason on the system. Turns out, my older version was installed in /usr/local/bin/phpunit, w here as the new version was just /usr/bin/phpunit.
Simply delete the old one, and if necessary, symlink the two together.
I have been using a Drobo and DroboShare for almost two years now and have been very happy with it. I have used it to replace a windows machine that I was using just as a file share.
The one I have is kind of slow over the network. I know the newer versions are faster. I just deal with the speed, in the long run, it doesn’t bother me that badly. And for doing backups, it’s amazing.
I never really thought to ask the question, but was shocked to see you can do simple conditional statements in Mysql. This will make my querying far better than in the past. Plus I can pull quick data when needed instead of writing a script to analyze it.
Example, trying to find out if an order was placed in our callcenter or on the web:
SELECT orderDate, if(ipAddress = ‘XXX.XXX.XXX.XXX’, ‘CallCenter’, ‘Web’) as WherePlaced, count(*) as cnt FROM orders GROUP BY orderDate, WherePlaced
Simple, but only useful if you know about it. Now I do. 🙂
Getting Counts For Groupings From Mysql
My dad “beto” asked me about a topic he would like to use on his website. I decided to share it publicly.
He has a simple select box that stores a “Yes/No/Maybe” option in a table. He wants to include the results on a webpage.
I have to assume his Mysql table (let’s call it ReunionAttendance) has at least two columns (SelectBoxValue, GuestsAttending). Adjust the field names for the actual table columns in your table.
There are many ways to do this. I am going to do it this way for a demonstration:
<?php
/*Â Steps needed
1) Get data from table
2) Put data into a variable
3) Display the table via HTML
*/
/* 1 */
$result = mysql_query(“SELECT SelectBoxValue, SUM(GuestsAttending) as Attending FROM ReunionAttendance GROUP BY SelectBoxValue”);
/* 2 */
while (list($comingValue, $comingCount) = mysql_fetch_row($result)) {
$list[$comingValue] = $comingCount;
}
/* 3 */
?>
<div id=”WhosComing”>
<table>
<thead>
<tr>
<th>Coming?</th>
<th>Total</th>
</tr>
</thead>
<tbody><?php
foreach ($list as $comingValue => $comingCount) {
?>
<tr>
<td><?php echo $comingValue?></td>
<td align=”right”><?php echo $comingCount?></td>
</tr>
<?php
}?>
</tbody>
</table>
</div>