Skip to content

Instantly share code, notes, and snippets.

View yllus's full-sized avatar

Sully Syed yllus

View GitHub Profile
@yllus
yllus / aws-copy.bat
Created October 6, 2016 13:50
aws-copy.bat
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 47 TOR@EDM\15#47TOR(TV)@EDM(TV)082815.MP4" s3://cfl.vod.source/2015/2218.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 48 CGY@WPG\15#48CAL(TV)@WPG(TV)082915.MP4" s3://cfl.vod.source/2015/2219.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 49 SASK@OTT\15#49SSK(TV)@OTT(TV)083015.MP4" s3://cfl.vod.source/2015/2220.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 73 WPG@BC\15#73WPG(TV)@BC(TV)101015.MP4" s3://cfl.vod.source/2015/2244.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 74 TOR@MTL\15#74TOR(TV)@MTL(TV)101215.MP4" s3://cfl.vod.source/2015/2245.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 75 WPG@OTT\15#75WPG(TV)@OTT(TV)101615.MP4" s3://cfl.vod.source/2015/2246.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 76 CAL@TOR\15#76CAL(TV)@TOR(TV)101715.MP4" s3://cfl.vod.source/2015/2247.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 77 BC@EDM\15#77BC(TV)@EDM(TV)101715.MP4" s3://cfl.vod.source/2015/2248.mp4
aws s3 cp "D:\DVSMEDIA\2015 CFL GAMES\GAME 78 HAM@MTL\15#78
<?php
// This file needs to be symlinked or copied to wp-content/object-cache.php
# Users with setups where multiple installs share a common wp-config.php or $table_prefix
# can use this to guarantee uniqueness for the keys generated by this object cache
if ( !defined( 'WP_CACHE_KEY_SALT' ) )
define( 'WP_CACHE_KEY_SALT', '' );
if ( ! defined( 'WP_REDIS_OBJECT_CACHE' ) ) {

Players

The query:

SELECT Player.CFLCentralID, 
Player.FirstName, 
Player.MiddleName, 
Player.LastName, 
Player.BirthDate, 

Player.BirthPlace,

<div id="ad_bigbox_99">
<script>
window.CFLAdUtility.displayAd('CFL_Network_BigBox', 'ad_bigbox_99', [300, 250]);
</script>
</div>
@yllus
yllus / cfl_pickem_ads.md
Last active May 17, 2016 21:42
Ad spot HTML for the CFL Pick'em website.

To display any of these ad spots, you'll need to put this code in the header of your site:

<script type='text/javascript'>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
  var gads = document.createElement('script');
  gads.async = true;
  gads.type = 'text/javascript';

var useSSL = 'https:' == document.location.protocol;

@yllus
yllus / QUERIES.md
Last active May 9, 2016 15:39
PowerPivot queries against CFL Connect

To get game-by-game Passing data:

SELECT Player.CFLCentralID, 
Game.Season AS season, 
Game.GameID AS game_id, 
MAX(Game.GameTypeID) AS game_type_id, 
MAX(Game.GameDay) AS game_date, 
MAX(Game.WeekNum) AS week, 
MAX(HomeClub.Code) AS home_team_abbreviation, 

MAX(VisitorClub.Code) AS visitor_team_abbreviation,

To get back an XML document containing the "VAST2" ad response, call the URL provided in the video feed's JSON data at meta->url_vast2 ( http://www.cfl.ca/?feed=feed-youi-videos&page[number]=1&page[size]=20 ), which will look like:

https://pubads.g.doubleclick.net/gampad/ads?sz=1280x720&iu=/103711331/CFL_Mobile_App_Video&cust_params=[key_values]&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&correlator=[timestamp]

A few quick notes:

  • The string "[ad_category_params]" (without quotes) needs to be URL encoded (see https://support.google.com/dfp_premium/answer/1080597 ). It should have the form of app_section=val, and where val is should be the name of the Video Category of the video being viewed. Some examples:
    • app_section%3D103rd%20Grey%20Cup
    • app_section%3D2015%20Game%20Recaps
  • app_section%3D%23KegSize%20Plays%20of%20the%20Week
127.0.0.1 local-en.montrealalouettes.com # MAMP PRO - Do NOT remove this entry!
::1 local-en.montrealalouettes.com # MAMP PRO - Do NOT remove this entry!
127.0.0.1 local-www.stampeders.com # MAMP PRO - Do NOT remove this entry!
::1 local-www.stampeders.com # MAMP PRO - Do NOT remove this entry!
127.0.0.1 local-www.riderville.com # MAMP PRO - Do NOT remove this entry!
::1 local-www.riderville.com # MAMP PRO - Do NOT remove this entry!
127.0.0.1 local-www.argonauts.ca # MAMP PRO - Do NOT remove this entry!
::1 local-www.argonauts.ca # MAMP PRO - Do NOT remove this entry!
127.0.0.1 local-www.bclions.com # MAMP PRO - Do NOT remove this entry!
::1 local-www.bclions.com # MAMP PRO - Do NOT remove this entry!

Example URL:

Bearing in mind I want an accurate Games Played (GP) state, here's the SQL of how I'm calculating the field goal numbers for Anthony Alix:

SELECT Game.Season as season, 
Club.Code AS team_abbreviation, 
COUNT(Game.GameID) AS games_played, 

SUM(StatGameFieldGoal.[Field Goals]) AS field_goals_attempts,

The sponsor image can be retrieved at:

http://pubads.g.doubleclick.net/gampad/ad?iu=/103711331/CFL_Mobile_App_Week_Sponsor&sz=380x60&t=slot%3Dad-schedule-week-11&c=[correlator]

The link that should be navigated to if tapped:

http://pubads.g.doubleclick.net/gampad/jump?iu=/103711331/CFL_Mobile_App_Week_Sponsor&sz=380x60&t=slot%3Dad-schedule-week-11&c=[correlator]

A few quick notes: