This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
jasmine: { | |
proposalPlus: { | |
// Include paths for both the local user, if we're in dev mode, as well as share mode | |
src: 'pp_ngApp_' + process.env.USER + '.resource/pp_ngApp/**/*.js, pp_js' + process.env.USER + '.resource/pp_js/**/*.js, pp_ngApp/pp_ngApp/**/*.js, pp_js/pp_js/**/*.js', | |
options: { | |
// Include path for Jasmine spec files, including both dev and share path versions. | |
specs: 'pp_test_' + process.env.USER + '.resource/pp_test/**/*spec.js, pp_test/pp_test/**/*spec.js', | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71: # create an ad | |
72: # create_ad(oid, cid, n, mpid, sd, ed, d, vinit, vaud, vlang, pltyp, ct, pdev, arc, params = {}) | |
73: gmt_start = DateTime.parse("2014-1-26").to_time.to_i #+ offset_in_seconds | |
74: gmt_end = DateTime.parse("2014-1-31" + 'T23:59:00').to_time.to_i | |
75: new_add = mash(@adap.create_ad("6482","44810", "Best Test Ad Ever!", "33", gmt_start, gmt_end, "15", "AUTO", "YES", "ENGLISH", "GAME_PLAYER", "PRO", "ANY", "VIDEO")) | |
=> 76: binding.pry | |
77: end | |
78: end | |
[1] pry(#<AdapMiddleware::App>)> gmt_start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "body" : | |
{ | |
"messageSegments" : [ | |
{ | |
"type": "mention", // <== type = mention for @mentions | |
"id":"005D0000001LL8YIAW" <== user id for the @mention | |
}, | |
{ | |
"type": "link", | |
"href":"http://www.google.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
and ( | |
YEAR(Date_Start__c) == YEAR(TODAY()), | |
IF( | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) > 52, | |
52, | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) | |
) == | |
IF( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'icomoon'; | |
src: url('fonts/icomoon.eot'); | |
} | |
@font-face { | |
font-family: 'icomoon'; | |
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8ywAAAC8AAAAYGNtYXDgfOaMAAABHAAAAERnYXNwAAAAEAAAAWAAAAAIZ2x5ZlRMFxoAAAFoAAA6WGhlYWQASAk3AAA7wAAAADZoaGVhB8ID+wAAO/gAAAAkaG10eOIADMUAADwcAAAA6GxvY2GdD5AIAAA9BAAAAHZtYXhwAEMBLQAAPXwAAAAgbmFtZUQXtNYAAD2cAAABOXBvc3QAAwAAAAA+2AAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAgPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADAAAAAIAAgAAgAAACDgNOYC//8AAAAg4ADmAP///+EgAho3AAEAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBRABEDrgNuAFMAAAEuASIGBwEOARQWFx4BMjY3AT4BNCYnLgEiBg8BDgEUFhceATI2PwE+ATIWFx4BFAYHAQ4BIiYnLgE0NjcBPgEyFhceARQGDwEeAxc3PgE0JicDrihmamYp/isoKCgoKWZqZigBIBkZGRkZP0I/GbQKCgoKCRcYFwm1BhAQEAYGBgYG/uAWNzk3FhYWFhYB1RY3OTcWFhYWFgQLEQwHAS4pKSkpA24pKSkp/isoZmpmKSgoKCgBIBk/Qj8ZGRkZGbUJFxgXCQoKCgq0BgYGBgYQEBAG/uEWFhYWFjc5NxYB1RYWFhYWNzk3FgQPICIjEi4pZmpmKAA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp').config(['$httpProvider', function($httpProvider) { | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html xmlns:ng="http://angularjs.org"> | |
<body> | |
Hello {{'World'}}! | |
<script src="http://code.angularjs.org/angular.js"></script> | |
<script> | |
angular.element(document).ready(function() { | |
RemoteJSCall.then(function(results){ | |
//manipulate results if needed. | |
//do whatever with results to get app ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write a general-purpose reducer that excludes items based on a predicate | |
function excludeReducer(predicate) { | |
return function(newArray, item) { | |
return predicate(item) ? newArray : newArray.concat(item); | |
} | |
} | |
function excludeIdReducer(id) { | |
return excludeReducer(function(item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter('Autolink', ['$sce', function($sce){ | |
var urlPattern = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/gi; | |
return function(text, target, otherProp) { | |
if(text === undefined || | |
text === null ) { return $sce.trustAsHtml(text);} | |
angular.forEach(text.toString().match(urlPattern), function(url) { | |
text = text.replace(url, "<a target=\"" + target + "\" href="+ url + ">" + url.substring(0,30) +"</a>"); | |
}); | |
return $sce.trustAsHtml(text); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular./** | |
* app Module | |
* | |
* skeleton app module for skeleton directive. | |
*/ | |
var app = angular.module('app', []) | |
.directive('ng', ['', function(){ | |
// Runs during compile | |
return { | |
name: 'modelAndBind', |