Skip to content

Instantly share code, notes, and snippets.

Avatar
🙏

Fabiano Carneiro de Oliveira FabianoLothor

🙏
View GitHub Profile
View shuffle-name.html
<!-- Valid HTML Test -->
<!doctype html>
<html lang=en>
<meta charset=utf-8>
<pre id='data'></pre>
<script>
function onDataLoaded(data) {
var h2Content = data.feed.entry.find((entry) => entry.title.$t == 'H2').content.$t;
var h3Content = data.feed.entry.find((entry) => entry.title.$t == 'H3').content.$t;
document.getElementById('data').innerHTML = h2Content + " and " + h3Content;
View funny.js
const anyArr = [[1,2,[3,[6],5]],4];
console.log(anyArr.join(' ').replace(' ', ',').split(',').map(value => parseInt(value)).sort());
View index.html
<html>
<head>
<style>
html, body {
color: white;
font-size: 14pt;
margin: 0;
padding: 0;
text-align: center;
}
View cartola-guru-loader.user.js
// ==UserScript==
// @name cartola-guru-loader
// @namespace http://fabianolothor.com.br/
// @version 1.1
// @description Carrega o Cartola Guru
// @author Fabiano (Lothor)
// @match https://cartolafc.globo.com/*
// ==/UserScript==
(function() {
View gchess.js
"use strict";
// Perf TODO:
// Merge material updating with psq values
// Put move scoring inline in generator
// Remove need for fliptable in psq tables. Access them by color
// Optimize pawn move generation
// Non-perf todo:
// Checks in first q?