This file contains 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('myFilters', []).filter('momentjs', function() { | |
return function(input, formatString) { | |
var m = moment(input) | |
, formatString = formatString || '' | |
, out = ''; | |
if(m && m.isValid()) { | |
if(formatString == 'calendar') { | |
out = m.calendar(); |
This file contains 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
var cnJqueryUi = angular.module('cn.jquery', []); | |
cnJqueryUi.directive('autoComplete', function($http) { | |
// by default do not format autocomplete data | |
var defaultFormatter = function(data) { return data }; | |
return { | |
scope: { |
This file contains 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
<?php | |
namespace Silex\Provider; | |
use Silex\Application; | |
use Silex\SilexEvents; | |
use Silex\ControllerProviderInterface; | |
use Silex\ControllerCollection; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
This file contains 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
<?php | |
/* | |
* ROUTING | |
*/ | |
$app->get('/archive/{year}/{month}', function($month, $year) { | |
// ... | |
}) |
This file contains 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
/* | |
* Simple Library to interaction with Highcharts | |
* | |
*/ | |
var Highwire = function () { | |
var chart | |
, graph_container; |
This file contains 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
<?php | |
class CubsDraft | |
{ | |
public $_stats = []; | |
protected $_table = null; | |
public function __construct() | |
{ |
This file contains 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
[merge] | |
keepBackup = false | |
tool = custom | |
[mergetool "custom"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false |
This file contains 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
UPDATE sub_campaign | |
SET sub_campaign.name = ( | |
SELECT targeting_type.name | |
FROM targeting_type | |
WHERE targeting_type.id = sub_campaign.targeting_type_id | |
) | |
WHERE sub_campaign.name IS NULL; |
This file contains 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
let Component = { | |
template: ` | |
<div> | |
<h1>{{$ctrl.title}}</h1> | |
<form ng-if="!$ctrl.successs"> | |
form data... | |
</form> | |
<div |
This file contains 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
// https://bitbucket.org/repomode/bartleby-frontend/pull-requests/6/merging-dev-to-master-for-push-to-staging/diff#Lapp/routes/category/category.model.jsT144 | |
// Lodash assign (just use Object.assign). | |
// Lodash uses Object.assign behind the scenes anyway. | |
Object.assign(obj, {}, {}); | |
// https://bitbucket.org/repomode/bartleby-frontend/src/3ee2cc7aca1a49ab3baa311173780da07b5a6d9f/app/routes/category/category.model.js?fileviewer=file-view-default#category.model.js-38 | |
// Lodash.get (just use the or operator) | |
let temp = {a: 'a',b: 'b',c: 'c'}; | |
temp.a || ‘z’; |
OlderNewer