Skip to content

Instantly share code, notes, and snippets.

View davidcroda's full-sized avatar

David Roda davidcroda

  • ZaiNar
  • Philadelphia, PA
View GitHub Profile
var XXHash = require('xxhash'),
seed = 1, // Seed doesn't matter because we aren't using the hash cryptographically
path = require('path')
exports.utils = function(grunt, options) {
return {
getHash: function(file) {
return XXHash.hash(grunt.file.read(file, {
encoding: null
SELECT SQL_NO_CACHE COUNT(*) AS `count` FROM `posts` AS `Post` left JOIN `campaigns` AS `Campaign` ON (`Post`.`campaign_id` = `Campaign`.`id`) WHERE `Campaign`.`id` IN (1977, 779, 780, 782, 783, 784, 785, 786, 1750, 787, 1356, 790, 791, 792, 793, 794, 795, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 813, 814, 815, 730, 816, 819, 821, 822, 823, 824, 811, 827, 829, 731, 830, 831, 1425, 890, 832, 833, 835, 254, 837, 839, 841, 842, 843, 844, 845, 846, 847, 848, 1020, 849, 850, 851, 852, 853, 798, 812, 818, 825, 826, 836, 838, 856, 732, 828, 855, 857, 859, 860, 861, 862, 864, 865, 866, 867, 869, 871) AND `Post`.`updated_timestamp` BETWEEN 1392219518 AND 1394807918 AND `Post`.`from_cms` = 1
SELECT `Post`.`id`, `Post`.`service_id`, `Post`.`campaign_id`, `Post`.`from_name`, `Post`.`from_id`, `Post`.`from_img`, `Post`.`message`, `Post`.`picture`, `Post`.`link`, `Post`.`name`, `Post`.`name_href`, `Post`.`name_caption`, `Post`.`description`, `Post`.`comment_count`, `Post`.`updated_timestamp`, `Post`.`service`, `Post`.`in_reply_to_status_id`, `Post`.`created_time`, `Post`.`user_actions`, `Post`.`is_read`, `Post`.`is_read_user`, `Post`.`from_cms`, `Post`.`from_user`, `Post`.`categories`, `Post`.`tags`, `Post`.`type`, `Post`.`post_type_id`, `Post`.`competitor`, `Post`.`attribution_text`, `Post`.`attribution_url`, `Post`.`attribution_logo`, `Post`.`data`, `Post`.`assignment_id`, `Post`.`connection_id`, `Post`.`status`, `Post`.`is_flagged`, `Post`.`user_id`, `User`.`display_name`, `Campaign`.`id`, `Campaign`.`title`, `Campaign`.`www`, `Campaign`.`archived`, `Campaign`.`autopost`, `Campaign`.`autopost_error`, `Campaign`.`monitor`, `Campaign`.`holiday_posts`, `Campaign`.`sweepstake_posts`, `Campaign`.`notes
<?php
function test($id) {
$this->autoRender = false;
App::import('Lib','WordpressFacade');
$wordpressFacade = new WordpressFacade();
$account = $this->WordpressConnection->read(null, $id);
$account = $account['WordpressConnection'];
function test($id) {
$this->autoRender = false;
App::import('Lib','WordpressFacade');
$wordpressFacade = new WordpressFacade();
$account = $this->WordpressConnection->read(null, $id);
$account = $account['WordpressConnection'];
$wordpressFacade->setCredentials($account['url'],$account['wp_username'],$account['password']);
<?php
/**
* GooglesController
*
* @author David Roda
* @package services
*/
/**
* Unused class to control Google Plus API
* @package services
<?php
$parsed = parse_url($url);
if(isset($parsed['scheme'])) {
$scheme = $parsed['scheme'];
} else {
$scheme = "http";
}
$path = substr($parsed['path'],1);
$parts = explode("/",$path);
$parsed = parse_url($url);
if(isset($parsed['scheme'])) {
$scheme = $parsed['scheme'];
} else {
$scheme = "http";
}
$path = substr($parsed['path'],1);
$parts = explode("/",$path);
foreach($parts as $k=>$part) {
$parts[$k] = urlencode(urldecode($part));
diff --git a/app/controllers/assignments_controller.php b/app/controllers/assignments_controller.php
index 26326ef..9b0f42c 100755
--- a/app/controllers/assignments_controller.php
+++ b/app/controllers/assignments_controller.php
@@ -850,7 +850,7 @@ class AssignmentsController extends AppController {
$filter['Campaign.archived'] = 0;
$filter['Assignment.hidden'] = 0;
- if(isset($filter['Article.market_id'])) {
+ if(isset($filter['Article.market_id']) || isset($filter['OR']['Article.title LIKE'])) {
1 DYNO
===================================================
Benchmarking express-test.respage.com (be patient).....done
Server Software: Apache/2.2.25
Server Hostname: express-test.respage.com
Server Port: 80
Document Path: /users/login