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
const stepIdentity = Machine({ | |
id: 'identity', | |
initial: 'not_started', | |
states: { | |
'not_started': { | |
on: { | |
'iss_country_submitted': 'in_progress', | |
'document_submitted': 'in_progress', | |
'address_submitted': 'in_progress', | |
} |
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
const stepIdentity = Machine({ | |
id: 'identity', | |
initial: 'not_started', | |
states: { | |
'not_started': { | |
on: { | |
'submit_iss_country': 'in_progress', | |
'submit_document': 'in_progress', | |
'submit_address': 'in_progress', | |
} |
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
const stepIdentity = Machine({ | |
id: 'identity', | |
initial: 'not_started', | |
states: { | |
'not_started': { | |
on: { | |
'iss_country_submitted': 'in_progress', | |
'document_submitted': 'in_progress', | |
'address_submitted': 'in_progress', | |
} |
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
function namespace(root, path, value){ | |
path.split('.').reduce(function(object, key, i, namespace) { | |
if(i < namespace.length) { | |
return object[key] = (object.hasOwnProperty(key) ? object[key] : {}) | |
} | |
return object[key] = (!value ? object[key] : value) | |
}, root) | |
} |
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
getAge = function (birthDate, nowDate) { | |
var today, age, mDiff, dDiff; | |
today = nowDate || new Date(); | |
age = nowDate.getFullYear() - birthDate.getFullYear(); | |
mDiff = nowDate.getMonth() - birthDate.getMonth(); | |
dDiff = nowDate.getDate() - birthDate.getDate(); | |
if (mDiff < 0 || (mDiff === 0 && dDiff < 0)) { | |
age -= 1; |
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
protractor.wrapDriver | |
protractor.setInstance | |
protractor.getInstance | |
protractor.By | |
protractor.By.binding | |
protractor.By.select | |
protractor.By.selectedOption | |
protractor.By.input | |
protractor.By.repeater |
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
def valid_triangle?(a, b, c) | |
# If any of the inputs = 0 then lets return false before doing anything else | |
# We don't need: if inputarray[0] > 0 && inputarray[1] > 0 && inputarray[2] > 0 then | |
return false if a == 0 || b == 0 || c == 0 | |
# Let's sort the array before we store it in the new variable | |
# Also, preferred ruby style calls for underscores to separate words | |
#inputarray = [a, b, c] | |
#inputarray.sort! |
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
# Description: | |
# Hubot picks random emojis. | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
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
$('tr.merged-content td.name h3 a.css-truncate').each(function(i, el) { | |
url = el.href.replace('/tree/', '/branches/'); | |
if(!url.match('master')) { | |
$.ajax({ | |
url: url, | |
type: 'DELETE' | |
}) | |
} | |
}) |
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
$('tr.unmerged-content td.name h3 a.css-truncate').each(function(i, el) { | |
url = el.href.replace('/tree/', '/branches/'); | |
console.log(url); | |
// $.ajax({ | |
// url: url, | |
// type: 'DELETE' | |
// }) | |
}) | |
$('tr.merged-content td.name h3 a.css-truncate').each(function(i, el) { |
NewerOlder