Skip to content

Instantly share code, notes, and snippets.

mysql> select * from user_count order by count desc limit 50;
+------------------+-------+
| user | count |
+------------------+-------+
| @oracleofmydoc | 12122 |
| oracleofmydoc | 12122 |
| @nasa | 11322 |
| nasa | 11322 |
| @designsbylilla | 10626 |
| designsbylilla | 10626 |
mysql> select * from hashtag_count order by count desc limit 50;
+------------------------+-------+
| hashtag | count |
+------------------------+-------+
| #cybermonday | 39674 |
| #sale | 32346 |
| #shopping | 32038 |
| #jewelry | 25354 |
| #thanksgiving | 22650 |
| #shop | 22254 |
mysql> select * from hashtag_count order by count desc limit 50;
+--------------------+-------+
| hashtag | count |
+--------------------+-------+
| #cybermonday | 37662 |
| #shopping | 31014 |
| #sale | 30682 |
| #jewelry | 24776 |
| #shop | 21960 |
| #thanksgiving | 21840 |
@jclapp23
jclapp23 / general-template.php
Created October 10, 2013 02:45
general-template.php
<?php
/**
* General template tags that can go anywhere in a template.
*
* @package WordPress
* @subpackage Template
*/
/**
* Load header template.
private function getPlayerByLastNameAndSport($lastName,$teamStr,$sport){
$doctrine = $this->getContainer()->get("doctrine");
$em = $doctrine->getManager();
$playerRepo = $em->getRepository("RotoRobotBundle:Player");
$sportsLeagueRepo = $em->getRepository("RotoRobotBundle:SportsLeague");
$teamRepo = $em->getRepository("RotoRobotBundle:Team");
$sportsLeague = $sportsLeagueRepo->findOneBy(["name"=>$sport]);
$teamKeys = array(
<?php
/*** turn on error reporting ***/
error_reporting( E_ALL );
/*** an array of test values ***/
$values = array( $var, null, 0, false, 100, '');
echo '<tr>';
echo '<td>isset()</td>';
foreach( $values as $val )
{
@jclapp23
jclapp23 / gist:6080324
Created July 25, 2013 14:37
WP_Cal_Demo #7
<?php
$calendar_output .= '<td style="position:relative">';
if ( in_array($day, $daywithpost) ){ // any posts today?
$title_div = "<div class='event-titles'>";
foreach($ak_titles_for_day[$day] as $ak_title){
$title_div .= "<a href='".$ak_title['url']."' title='".$ak_title['title']."'>".$ak_title['title']."</a><br/>";
@jclapp23
jclapp23 / gist:6079773
Created July 25, 2013 13:45
WP_Cal_Demo # 6
$('#wp-calendar span').hover( function () {
$(this).next().show();
},
function () {
$(this).next().hide();
});
$('#wp-calenda div').hover( function () {
$(this).show()
},
@jclapp23
jclapp23 / gist:6079757
Created July 25, 2013 13:43
WP_Cal_Demo #6
<?php
$calendar_output .= '<td>';
if ( in_array($day, $daywithpost) ){
$title_div = "<div>";
foreach($ak_titles_for_day[$day] as $ak_title){
$title_div .= "<a href='".$ak_title['url']."' title='".$ak_title['title']."'>".$ak_title['title']."</a><br/>";
}
$title_div .= "</div>";
$calendar_output .= "<span>$day</span>".$title_div;
@jclapp23
jclapp23 / gist:6079731
Created July 25, 2013 13:40
WP_Cal_Demo #5
<?php
$calendar_output .= '<td>';
if ( in_array($day, $daywithpost) ) // any posts today?
$calendar_output .= '<a href="' . get_day_link( $thisyear, $thismonth, $day ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) . "\">$day</a>";
else
$calendar_output .= $day;
$calendar_output .= '</td>';