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
(use 'clojure.walk) | |
(def my-vec [[1 2] [3 4]]) | |
(def simple-vec [1 2]) | |
; mapv approach | |
(defn rand-walk [x a] (+ x (* a (- (rand) (rand))))) | |
(defn rwalk->vec [v a] (mapv #(rand-walk % a) v)) | |
; working |
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
Shell.exec("ssh-keyscan" | |
+ " -p " + parsedUrl.port | |
+ " -t rsa " | |
+ parsedUrl.hostname, function(code, output) { | |
var commentedKey = output.split('\n'); | |
var key = commentedKey[1].split(' '); | |
publicKey = key[1] + ' ' + key[2]; | |
hostString = '[' + parsedUrl.hostname + ']:' + parsedUrl.port | |
+ ',[' + remoteIP + ']:' + parsedUrl.port |
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 filePath = res.execution.project.folder | |
+ settings.fileSystem.artifactsFolder | |
+ '/' | |
+ res.filename; | |
reply.file(filePath, {filename: res.filename}); | |
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
{ | |
method: 'GET', | |
path: '/Artifact/{id}/getFile', | |
config: { | |
handler: controllers.Artifact.getFile, | |
tags: ['api'], | |
description: 'gets the file of a given artifact using its id', | |
auth: false, | |
// auth: { |
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
/** | |
* Creates a new git repo on Stash using their API | |
* | |
* @method createStashRepo | |
* @param {string} repoName Name of the repo to create | |
* @returns {promise} | |
*/ | |
createStashRepo: function (repoName) { | |
var repoOptions = { | |
"name": repoName, |
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
utils.validateKeystore = function (path, keystore, passwd, alias) { | |
if (typeof path === 'undefined') { | |
path = "."; | |
} | |
var deferred = Q.defer(); | |
// check file extension | |
if (keystore.indexOf(".keystore") == -1) { | |
keystore += ".keystore"; |
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
{ | |
"project": { | |
"name": "Proyecto iOS desde Mocha 34f61bf0-83bd-11e5-815a-c1f94f9b65be" | |
}, | |
"url": "http://localhost:8080", | |
"user": "mat", | |
"token": "360fcde05063014618e36c908ef5eccf", | |
"auth": "bWF0OjM2MGZjZGUwNTA2MzAxNDYxOGUzNmM5MDhlZjVlY2Nm", | |
"pipelineDirectory": "/Users/mat/Development/HYBREED/_TEMPLATES/pipelines/_MLM_IOS_", | |
"gitRepo": "undefined/34f61bf0-83bd-11e5-815a-c1f94f9b65be.git", |
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
grepCommand.on('close', function (code) { | |
if (code === 0) { | |
var dateFinish = result.replace(/([^]*)(hasta: )([^\n]*)(\n)([^]*)/gm, "$3"); | |
console.log("DATE: " + dateFinish); | |
console.log("keystore is valid"); | |
deferred.resolve(); | |
} else { | |
console.error("Error validating keystore"); | |
deferred.reject("Error validating keystore"); | |
} |
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
" The silver searcher with CtrlP | |
let g:ctrlp_map = '<C-P>' | |
nnoremap \ :grep! "\b<C-R><C-W>\b"<CR>:cw<CR> | |
if executable('ag') | |
set grepprg=ag\ --nogroup\ --nocolor | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
let g:ctrlp_use_caching = 0 | |
endif | |
let g:ctrlp_working_path_mode = 'ra' | |
let g:ctrlp_custom_ignore = '\v[/\](node_modules|target|dist)|(\.(swp|ico|git|svn))$' |
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
showLicenseConditions: function (firstAcc) { | |
var self = this; | |
Hybreed.UI.showSpinner(); | |
if (firstAcc) { | |
navigator.silkUA.checkUserAgreement(this.language, function (res) { | |
console.log('<Controller.js> language: ' + res); |
OlderNewer