itsa tool
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Morgan 'ARR\!' Allen 2024-07-08 23:50:49 -07:00
commit c1dc59ecba
2 changed files with 66 additions and 0 deletions

11
.woodpecker.yml Normal file
View File

@ -0,0 +1,11 @@
steps:
build:
image: git.oit.cloud/morgan/hugo-builder:latest
pull: true
secrets: [ ID_RSA, MQTT_HOST, MQTT_USER, MQTT_PASS ]
commands:
- echo "starting hugo build"
- echo $${ID_RSA}|sed -e 's/- /-\n/'|sed -e 's/ -/\n-/' > ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- ssh-keyscan oit.cloud >> ~/.ssh/known_hosts
- rsync -avrx public/. blog@oit.cloud:/var/www/tools.oit.cloud/

55
board_calc.html Normal file
View File

@ -0,0 +1,55 @@
<html>
<head>
<style>
ul, li {
padding: 0;
}
</style>
</head>
<body>
<div>
<label for="length">Board Length</label>
<input name="length" value="114" />
</div>
<div>
<label for="width">Board Width</label>
<input name="width" value="6" />
</div>
<button type="submit" onclick="calc()">Calculate</button>
<ul id="list">
</ul>
<script type="text/javascript">
var list = document.querySelector('#list');
var length = document.querySelector('[name=length]');
var width = document.querySelector('[name=width]');
function calc() {
var l = length.value;
var w = width.value;
var a = [];
list.innerHTML = '';
for(var i = 2; i < l; i++) {
a.push([l/i, i * w, (l/i) / (i * w), i]);
}
a.sort(function(a, b) {
return a[2] > b[2];
});
console.log(a.filter(function(el) {
if(el[2] > 0.75 && el[2] < 1.25) {
console.log(el);
list.innerHTML += `<ul>${el[3]} cuts for ${el[0]} x ${el[1]}`;
}
}));
}
calc();
</script>
</body>
</html>