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
<!-- great for the heinous bounce factor on mobile safari --> | |
<script> | |
document.addEventListener( "DOMContentLoaded", function() { | |
// allow scrolling on appropriate elements lower in the DOM | |
[].map.call(document.querySelectorAll('.scrollable'), function(el) { | |
el.addEventListener('touchmove', function(e) { | |
e.scrollable = true; | |
}); |
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
.aspectRatio(@widthAspect, @heightAspect) { | |
@aspect: @heightAspect/@widthAspect * 100; | |
max-width: 100%; | |
&:before { | |
content: ''; | |
display: block; | |
width: 100%; | |
padding-bottom: ~"@{aspect}%"; | |
} |
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
/* | |
Note: | |
1) THERE MUST BE A BETTER WAY TO DO THIS | |
2) The colored portion of the gradients must be the same as their parent's background | |
3) The hover state was only added for demonstration | |
*/ | |
* {margin: 0; padding: 0;} |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 calculate-fret-distance($scaleLength, $nthFret) | |
@return $scaleLength - $scaleLength / pow(2, ($nthFret/12)) |
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
?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<!-- | |
All appSettings are made available to your Node.js app via environment variables | |
You can access them in your app through the process.env object. | |
process.env.<key> | |
--> |
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
p Well met with Fibonacci bigger brother, AKA Tribonacci. | |
p As the name may already reveal, it works basically like a Fibonacci, but summing the last 3 (instead of 2) numbers of the sequence to generate the next. And, worse part of it, regrettably I won't get to hear non-native Italian speakers trying to pronounce it :( | |
p So, if we are to start our Tribonacci sequence with [1, 1, 1] as a starting input (AKA signature), we have this sequence: | |
code [1, 1 ,1, 3, 5, 9, 17, 31, ...] | |
p But what if we started with [0, 0, 1] as a signature? As starting with [0, 1] instead of [1, 1] basically shifts the common Fibonacci sequence by once place, you may be tempted to think that we would get the same sequence shifted by 2 places, but that is not the case and we would get: | |
code [0, 0, 1, 1, 2, 4, 7, 13, 24, ...] |
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
p The number 89 is the first integer with more than one digit that fulfills the property partially introduced in the title of this kata. What's the use of saying "Eureka"? Because this sum gives the same number. | |
p In effect: | |
code 89 = 8^1 + 9^2 | |
p The next number in having this property is 135. | |
p See this property again: | |
code 135 = 1^1 + 3^2 + 5^3 |
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
let obj = {} | |
obj[Symbol.for('unique_prop')] = 10; | |
console.log(obj[Symbol.for('unique_prop')]); //This will print 10! |