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 gulp = require('gulp'); | |
var jshint = require('gulp-jshint'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
rename = require('gulp-rename'), | |
minifycss = require('gulp-minify-css'), | |
del = require('del'); |
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 | |
App::uses('CakeRoute', 'Routing/Route'); | |
App::uses('ClassRegistry', 'Utility'); | |
class ArticleRoute extends CakeRoute { | |
/** | |
* Default model to load for the Article routes | |
* | |
* @var string |
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
ModalMixin = { | |
getInitialState: function() { | |
return { showModal: false }; | |
}, | |
close: function() { | |
this.setState({ showModal: false }); | |
}, | |
open: function() { | |
this.setState({ showModal: true }); | |
}, |
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 | |
App::uses('Component', 'Controller'); | |
class AnalyticsComponent extends Component { | |
/** | |
* Default actions for component | |
* | |
* @var array | |
*/ | |
public $actions = array('edit'); |
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 | |
App::uses('FormHelper', 'View/Helper'); | |
class BootstrapFormHelper extends FormHelper { | |
/** | |
* Overide parent method to use bootstrap input classes | |
* | |
* @param string $fieldName name of field to pass to parent method | |
* @param array $options list of options to pass to parent method | |
* |
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 App\Http\Middleware; | |
use Closure; | |
class Cors | |
{ | |
/** | |
* Handle an incoming request. |
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
this.$http.post(this.resource, data, { | |
beforeSend(xhr) { | |
if (this.lastRequest) { | |
this.lastRequest.cancel() | |
} | |
this.lastRequest = xhr | |
}, | |
}).then(response => { | |
//do something with request | |
}) |
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
input { | |
http_poller { | |
urls => { | |
node => { | |
method => get | |
url => "http://localhost:9200/_cluster/health" | |
headers => { | |
Accept => "application/json" | |
} | |
} |
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
actions: | |
1: | |
action: close | |
description: >- | |
Close indices older than 2 days (based on index name), for logstash | |
and beat indices. | |
options: | |
delete_aliases: False | |
timeout_override: | |
continue_if_exception: 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
field.field_slug.split('_').join(' ').replace(/\b\w/g, l => l.toUpperCase()) |
OlderNewer