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
| GET logs*/_search | |
| { | |
| "aggs": { | |
| "customerPhoneNo": { | |
| "terms": { | |
| "field": "customerPhoneNo", | |
| "size": 10000, | |
| "include": ["00000000", "0423382656"] | |
| }, | |
| "aggs": { |
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
| const arr = [...new Set([1, 2, 3, 3])]; | |
| [1, 2, 3] |
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
| # Find ip exclude non usage | |
| $ ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | grep 'Bcast' | grep -v '0.0.0.0' | cut -d: -f2 | awk '{ print $1}' |
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
| 'use strict'; | |
| (function() { | |
| angular.module('notes') | |
| .controller('selectAllOnClickController', [selectAllOnClickController]) | |
| function selectAllOnClickController() { | |
| var self = this; | |
| self.text = "Click me to select all" | |
| } | |
| })(); |
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
| describe('delete user...', () => { | |
| let resourceUrl; | |
| before(function() { | |
| resourceUrl = usersUrl + '/' + userid; | |
| }) | |
| it('should response success when deleting user exist', function(done) { | |
| request.delete(resourceUrl) | |
| .expect(200) | |
| .end(function(err, res) { | |
| res.body.should.have.property('success'); |
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
| var gulp = require('gulp' ), | |
| minifycss = require( 'gulp-minify-css'), | |
| uglify = require('gulp-uglify'), | |
| rename = require('gulp-rename'), | |
| clean = require('gulp-clean'), | |
| concat = require('gulp-concat'), | |
| cache = require('gulp-cache'), | |
| livereload = require( 'gulp-livereload'), | |
| connect = require('gulp-connect'), | |
| ngAnnotate = require( 'gulp-ng-annotate'), |
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
| 'use strict'; | |
| (function() { | |
| angular.module('notes') | |
| .controller('focusController', [focusController]) | |
| function focusController() { |
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
| var fill = d3.scale.category20();//define colors |
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
| 'use strict'; | |
| (function() { | |
| angular.module('notes') | |
| .directive('displayDate', [displayDate]) | |
| function displayDate() { | |
| return { | |
| restrict: 'A', | |
| require: 'ngModel', | |
| link: function(scope, element, attrs, ngModelCtrl) { |
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 = { | |
| 'secret': process.env.SECRET_KEY || 'user_auth_demo', | |
| 'database': process.env.MONGO_CONNECTION || 'mongodb://username:password@localhost:27017/user_auth_demo' | |
| }; |
NewerOlder