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 outputText = ""; | |
Array.from(document.getElementsByClassName("easy-card-list")).forEach(column => { | |
columnHeader = column.getElementsByClassName("column-name")[0].textContent.trim(); | |
outputText += "\n\n## " + columnHeader; | |
cards = Array.from(column.getElementsByClassName("easy-card")) | |
.map(card => { |
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
//@version=5 | |
indicator(title='Smoothed Mode', shorttitle='Consensus Price', overlay=true) | |
//User Inputs | |
percentageToleranceInput = input.int(title="Percentage Tolerance", defval=25) // The +/- tolerance in comparing values to compare them equal to get their mode | |
lengthInput = input.int(title="Length", defval=20) | |
source = input.source(title="Source", defval=close) | |
//getSmoothedModeForArray(array) => |
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 | |
set -e | |
# A precommit hook that uses spotless to format only staged files | |
# It also supports partially stage files using the following steps: | |
# 1. It stashed all the unstaged changes and then runs spotlessApply | |
# 2. After spotless apply is finished it applyes the stashed changes back on the code (that is also formatted/changed by spotless) | |
# 3. All the files that have conflicts due to the stash apply, it merges the conflict with the changes that are coming from the stash to not loose any new changes that were not staged |
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
Object.keys(Array.prototype[Symbol.unscopables]); // -> ['copyWithin', 'entries', 'fill', 'find', 'findIndex', 'keys'] | |
// Without unscopables: | |
class MyClass { | |
foo() { return 1; } | |
} | |
var foo = function () { return 2; }; | |
with (MyClass.prototype) { | |
foo(); // 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
var myArray = [1,2,3]; | |
// with `for of` | |
for(var value of myArray) { | |
console.log(value); | |
} | |
// without `for of` | |
var _myArray = myArray[Symbol.iterator](); | |
while(var _iteration = _myArray.next()) { |
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
swagger: "2.0" | |
info: | |
version: 2.0.0 | |
title: Swagger Petstore | |
description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification | |
termsOfService: http://swagger.io/terms/ | |
contact: | |
name: Swagger API Team | |
email: [email protected] | |
url: https://tech.zalando.com |
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
# Reference: | |
https://www.cloudgear.net/blog/2015/5-minutes-kubernetes-setup/ | |
# install homebrew and cask | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install virtualbox | |
brew cask install virtualbox | |
# install dockertoolbox |
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
--- | |
swagger: "2.0" | |
type: "string" | |
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
--- | |
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: "Swagger Petstore" | |
description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
name: "Swagger API Team" | |
license: |
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 luhn_validate(n){ | |
var l = /^[0-9]+$/.test(n)&&n.length, s = 0, b = 1; | |
while (l) | |
s += (b ^= 1) ? +[0, 2, 4, 6, 8, 1, 3, 5, 7, 9][+n[--l]] : +n[--l]; | |
return !!s && s % 10 === 0; | |
} |
NewerOlder