Skip to content

Instantly share code, notes, and snippets.

View Everlag's full-sized avatar
🎥
Stream@ Cloudflare

Kyle Boutette Everlag

🎥
Stream@ Cloudflare
View GitHub Profile
@Everlag
Everlag / exporter.js
Last active January 22, 2022 04:30
mtgtop8 xmage exporter
// Download an mtgtop8 decklist in a format compabible with xmage
//
// paste this into the dev console when viewing the .mwDeck
//
// Revision 2: includes a sideboard
sbindex = undefined; list = document.body.textContent.split('\n').filter((l)=> !l.includes('//')).map((l)=> l.replace(/\[.*\]\s/g, '').trim()); sbindex = list.findIndex(v => v.includes('SB')); list.splice(sbindex, 0, ''); list = list.map(v => v.replace(/SB:/, '').trim()); list = list.join('\n'); copy(list)
@Everlag
Everlag / test.js
Last active August 25, 2016 01:22
Hacker News scraper badness repoduction
commentContainers = document.querySelectorAll('td.default')
firstCommentContainer = comments[0]
// Fetch depth=upvote.width/40
function getHtml(commentContainer) {
// Doesn't work:
nothing = commentContainer.querySelectorAll('span.comment')
something = commentContainer.querySelectorAll('div.comment')
console.log(nothing, 'vs', something)
@Everlag
Everlag / primitive-worker.sh
Last active January 20, 2020 13:32
Loop through all in srcframes and run primitive over it, details in script.
# Loop through all in srcframes and run primitive over it
# Primitive: https://github.com/fogleman/primitive
#
# Dependencies: primitive, ffmpeg, and inkscape in path
#
# This supports job resumption with 'resume' and will keep track
# of frames which have been done.
#
# To clear for another set of srcframes, remove contents of
# vecframes and rastframes
@Everlag
Everlag / goap.go
Last active April 20, 2017 05:23
Naive GOAP(both buggy and slow)
package main
// This implements a half broken version of extremely
// naive flavor of Goal Oriented Action Planning
// Based off of https://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793
import (
"fmt"
"strings"
)
@Everlag
Everlag / mmm
Last active December 18, 2018 20:26
Preroll
https://watch.cloudflarestream.com/5d5bc37ffcf54c9b82e996823bffbb81?ad-url=https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x480%26iu%3D%2F124319096%2Fexternal%2Fsingle_ad_samples%26ciu_szs%3D300x250%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26cust_params%3Ddeployment%253Ddevsite%2526sample_ct%253Dlinear%26correlator%3D
All the roll
https://watch.cloudflarestream.com/5d5bc37ffcf54c9b82e996823bffbb81?ad-url=https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x480%26iu%3D%2F124319096%2Fexternal%2Fad_rule_samples%26ciu_szs%3D300x250%26ad_rule%3D1%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvmap%26unviewed_position_start%3D1%26cust_params%3Ddeployment%253Ddevsite%2526sample_ar%253Dpremidpost%26cmsid%3D496%26vid%3Dshort_onecue%26correlator%3D
https://watch.cloudflarestream.com/5d5bc37ffcf54c9b82e996823bffbb81?ad-url=https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x480%26iu%3D%2F21714852354%2Fstocktwits%26impl%3Ds%26gd