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
| '.source.js': | |
| 'import': | |
| 'prefix': 'import' | |
| 'body': "import { ${1:title} } from '${2:package-name}';" | |
| 'import-meteor': | |
| 'prefix': 'import-meteor' | |
| 'body': "import { Meteor } from 'meteor/meteor';" | |
| 'import-templating': | |
| 'prefix': 'import-templating' | |
| 'body': "import { Template } from 'meteor/templating';" |
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
| { | |
| "10000": { | |
| "time": 89, | |
| "{}": { | |
| "filter": 2, | |
| "groups": { | |
| "15": 1, | |
| "60": 0, | |
| "720": 1, | |
| "1440": 0, |
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
| // List of fields that are available on each log entry inside ElasticSearch. | |
| const fieldsList = [ | |
| 'api_key', | |
| 'backend_response_time', | |
| 'internal_gatekeeper_time', | |
| 'internal_response_time', | |
| 'proxy_overhead', | |
| 'request_accept', | |
| 'request_accept_encoding', | |
| 'request_at', |
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
| import oracledb from 'oracledb'; | |
| Meteor.methods({ | |
| submitStatement (data) { | |
| const oracleResponse = Async.runSync(function (done) { | |
| oracledb.getConnection(oracleConf, (err, connection) => { | |
| if (err) done(err); |
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
| #!/bin/bash | |
| # node-reinstall | |
| # credit: http://stackoverflow.com/a/11178106/2083544 | |
| ## program version | |
| VERSION="0.0.13" | |
| ## path prefix | |
| PREFIX="${PREFIX:-/usr/local}" |
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 config = { | |
| host: "hostname" | |
| }; | |
| var options = { | |
| index: 'api-umbrella-logs-v1-2015-12', | |
| type: 'log', | |
| size: 10, | |
| query: { | |
| match_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
| function getCalledMethod(text, commandsList){ | |
| for (var key in commandsList) { | |
| if (commandsList.hasOwnProperty(key)) { | |
| //console.log(key + " -> " + commandsList[key]); | |
| if (S(text).contains("/" + key)){ | |
| return commandsList[key]; | |
| } | |
| } | |
| } |
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
| Template.importApiDocumentation.events({ | |
| 'change #apiDocumentationFile': function (event/*, template*/) { | |
| var customProxy = "umbrella.apinf.io"; | |
| var customBasePath = "/api-umbrella"; | |
| // Gets selected file from the form | |
| var file = event.target.files[0]; | |
| // Initialises new reader instance |
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
| from scipy.spatial import distance | |
| import numpy as np | |
| from sklearn.svm import SVC | |
| file = 'iris.txt' | |
| f = open(file) | |
| data = [] | |
| for line in f: |
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
| 'submit #apiConfigurationUploadForm': function (event, template) { | |
| // calling method that converts YAML to JSON and returns Json object | |
| Meteor.call("convertYamlToJson", template.reactiveFile.get().name, function (err, jsonFile) { | |
| // logging an error if one exists | |
| if (err) console.log(err); | |
| // iterating through JSON object keys | |
| for (var key in jsonFile) { |