Skip to content

Instantly share code, notes, and snippets.

View MarcelloTheArcane's full-sized avatar
🍄

Max Reynolds MarcelloTheArcane

🍄
  • United Kingdom
View GitHub Profile
async function main() {
const fs = require("fs");
const R = require("ramda");
const tf = require("@tensorflow/tfjs-node");
const fsExtra = require('fs-extra');
const text = fs.readFileSync("input.txt").toString();
const chars = Array.from(new Set(text.split("")));
const encoding = Object.fromEntries(chars.map((x, i) => [x, i]));
const decoding = Object.fromEntries(chars.map((x, i) => [i, x]));
const sampleLength = 50;
@zachjharris
zachjharris / TipTapComponent.vue
Created June 29, 2020 12:56
Resizable images using TipTap Editor
<template>
<div class="tiptap-content">
<editor-content :editor="editor" />
</div>
</template>
<script>
import {
Editor,
EditorContent
@XlogicX
XlogicX / games.md
Last active October 28, 2024 15:50
List of Boot Sector Gamers

Boot Sector Games

A list of playable boot sector games, most of which are on github. Fun to play, great to learn from. There are also many cool non-booting boot sectors out there that aren't games (so more like demos), but this page is just reserved to interactive boot sectors / games. This list is also not complete, but not on purpose, it is a best effort collection of games, so if you know of any fun boot sector games, please contribute.

This page lists a collection of 31 games spanning several authors: nanochess, me, daniel-e, shikhin, JulianSlzr, XanClic, QiZD90, darkvoxels, guyhill, w-shackleton, egtzori, VileR, ish_works, franeklubi, queso_fuego, franeklubi, Jethro82, waternine9, tevoran, palma3k, taylor-hartman. peterferrie should also be mentioned as he has touched a lot of these games.

TetrOS

https://github.com/daniel-e/tetros

Tetris Clone. Full color, no score. This was one of the older boot sector games out there. ![tetros](https://gist.github.com/assets/1570856/3a0d1023-cbe6-4b4d-

function Mutilator(data, name, context) {
this.n = name || `mutilation-${+new Date()}`;
this.d = data;
this.c = context || window;
this.isArr = function(p) {
return this.d[p].constructor == Array;
};
this.dispatch = function(p, v, t) {
this.c.dispatchEvent(
new CustomEvent(this.n, {
@mihaiserban
mihaiserban / gist:1f35d488405812f2bbd4b16e38e4afb5
Last active June 27, 2023 03:38
aws s3.listObjects recursive including metadata
const aws = require('aws-sdk')
aws.config.update({
accessKeyId: process.env.aws_access_key_id,
secretAccessKey: process.env.aws_secret_access_key,
region: process.env.aws_region});
const options = {
Bucket: process.env.s3_bucket,
region: process.env.aws_region,
@matthewbeta
matthewbeta / scrim-gradient.scss
Last active September 5, 2024 10:18
A simple little SCSS mixin for creating scrim gradients
/*
A simple little SCSS mixin for creating scrim gradients
Inspired by Andreas Larson - https://github.com/larsenwork
https://css-tricks.com/easing-linear-gradients/
*/
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') {
$scrimCoordinates: (
@nblackburn
nblackburn / camelToKebab.js
Last active December 15, 2023 03:19
Convert a string from camel case to kebab case.
module.exports = (string) => {
return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
};