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
const path = require('path') | |
const fs = require('fs') | |
const recipesPath = path.join(__dirname, './decompiled/assets/minecraft/recipes/') | |
const recipeFileNames = fs.readdirSync(recipesPath) | |
const recipes = recipeFileNames.map(recipeFileName => { | |
return ({ | |
name: recipeFileName, |
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
// npm i median web3 | |
// Usage: node index.js web3Endpoint | |
const median = require('median') | |
const Web3 = require('web3') | |
if (process.argv.length !== 3) { | |
console.log('Usage: node index.js web3Endpoint') | |
process.exit(1) | |
} |
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
#!/bin/bash | |
# Puede ser necesario desactivar el firewall o si estás usando máquinas en redes distintas entre los ordenadores, abrir puertos | |
# Añadimos las IPs de todas las máquinas que queramos preparar, separadas por espacios | |
instance_ips=( 0.0.0.0 0.0.0.0 ) | |
instance_username="" | |
repo="[email protected]:imharvol/2021-ic-practica-4.git" | |
# Aqui hay que pegar la clave que se genera en ~/.ssh/id_rsa al hacer ssh-keygen |
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
NAME="FILENAME" && \ | |
asciidoctor -b html5 ${NAME}.asciidoc && \ | |
htmldoc -t epub ${NAME}.html -f ${NAME}.epub && \ | |
ebook-convert ${NAME}.epub ${NAME}.mobi |
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
# Instance Launch: | |
gcloud beta compute \ | |
--project=PROJECT-ID \ # Changeme | |
instances create virtualbox \ | |
--zone=europe-west2-c \ | |
--machine-type=n1-standard-2 \ | |
--metadata=ssh-keys=imharvol:ssh-rsa\ AAAAB3NzaC1yc2EAAAADAQABAAABAQDzQ5Z5gLRJXgLvUBCTkvsTfV2xbxkh64vlHZlZCNDz7u5BPb3PsR/ggrealR7JVDeStOB5yv52pj\+XYj3o5qhRLFhf2QZlvtpjBnfiDrZIIXGMkQ3McQlAixE1nZPHEt4mzwAEAuvd2KK\+RysaAQKZ2mTuwxmGE439ZJbQjbgBMOnGkR61YGDxZywBQnDMtJZ2I9B\+/kC07tQIkmj5L0YN/kpXfebmckn8d0Eq6ckPJ4vQI9aL9izE2kJwFK8NNghz/lfRTzWto78NaItDr1ipJQnm5ssyb57YFz7gamnwP\+1zcbXUlccfizbHsuyoYJ5Bqc0nFoprrafMdDHjEclD\ imharvol@imharvol-PC \ # Changeme | |
--image=ubuntu-2004-focal-v20210908 \ | |
--image-project=ubuntu-os-cloud \ | |
--boot-disk-size=32GB \ |
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
const mineflayer = require('mineflayer') | |
const vec3 = require('vec3') | |
const bot = mineflayer.createBot({ | |
host: 'localhost', | |
port: 40283, | |
username: 'test', | |
version: '1.16.5' | |
}) |
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
// Minecraft uuid/username finder for a dump | |
// Data: https://discord.com/channels/413438066984747026/413438067471548427/875846576860438559 | |
const path = require('path') | |
const fs = require('fs') | |
const JSONStream = require('JSONStream') | |
const es = require('event-stream') | |
fs.createReadStream(path.join(__dirname, 'json_log.txt')) | |
.pipe(JSONStream.parse(/username|uuid/)) |
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
### Keybase proof | |
I hereby claim: | |
* I am imharvol on github. | |
* I am imharvol (https://keybase.io/imharvol) on keybase. | |
* I have a public key ASAEKhnP72Q3KOyCpDjVrx7KHF0f8gyslT2gc299cjd25Qo | |
To claim this, I am signing this object: |