Simple keyframe animation:
@keyframes jump {
0%, 100% {
transform: translateY(0px);
}
30% {
transform: translateY(-30px);
}
Simple keyframe animation:
@keyframes jump {
0%, 100% {
transform: translateY(0px);
}
30% {
transform: translateY(-30px);
}
Found this gem from 2011. Credits: http://www.devcurry.com/2011/10/javascript-max-min-array.html
Array.prototype.max = function () {
return Math.max.apply(Math, this);
};
Array.prototype.min = function () {
return Math.min.apply(Math, this);
};
# Taken from https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command | |
if [ -n "$PATH" ]; then | |
old_PATH=$PATH:; PATH= | |
while [ -n "$old_PATH" ]; do | |
x=${old_PATH%%:*} # the first remaining entry | |
case $PATH: in | |
*:"$x":*) ;; # already there | |
*) PATH=$PATH:$x;; # not there yet | |
esac |
for (var i = 0, headings = $$('h1,h2,h3,h4,h5,h6'); | |
i < headings.length; i++) { | |
console.log(headings[i].textContent.trim() + " " + | |
headings[i].tagName, | |
headings[i]); | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Welcome to Vue</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.0/css/bulma.min.css"> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Welcome to Vue</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.0/css/bulma.min.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat"> | |
<script src="https://unpkg.com/vue"></script> | |
<style> |
import os | |
import math | |
import csv | |
def humanizeFileSize(filesize): | |
filesize = abs(filesize) | |
if (filesize==0): | |
return "0 Bytes" | |
p = int(math.floor(math.log(filesize, 2)/10)) | |
return "%0.2f %s" % (filesize/math.pow(1024,p), ['Bytes','KB','MB','GB','TB','PB','EB','ZB','YB'][p]) |
_.reduce(obj1, (result, value, key) => { | |
const variantValue = obj2[key]; | |
return _.isEqual(value, variantValue) ? result : result.concat(value); | |
}, []); |
const formatter = new Intl.NumberFormat('en-US', { | |
style: 'currency', | |
currency: 'USD', | |
minimumFractionDigits: 2, | |
}); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Hello Bulma!</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css"> | |
</head> | |
<body> |