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 fromLeonardoColorToTokenStudio(leonardoColors) { | |
| return { | |
| "colors": leonardoColors.reduce(function (memo, entry) { | |
| if (entry.values) { | |
| for (const value of entry.values) { | |
| const [name, shade] = value.name.split(/(?=[1-9])/g); | |
| memo[name] = { | |
| ...(memo[name] || {}), |
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 getCaretOffsetWithin = function(node) { | |
| var treeWalker = createTreeWalker(node); | |
| var sel = window.getSelection(); | |
| var pos = { | |
| start: 0, | |
| end: 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
| <?php | |
| /* | |
| * Check if the tournament is nearer than the distance thresold | |
| * according to the latitude and longitude parameters | |
| * | |
| * param1 : $latitude of the user | |
| * param2 : $longitude of the user | |
| * param3 : max distance | |
| * | |
| * Formula : http://www.movable-type.co.uk/scripts/latlong.html |