Skip to content

Instantly share code, notes, and snippets.

View y-ack's full-sized avatar
♻️
brain damage per second

ywy y-ack

♻️
brain damage per second
View GitHub Profile
@y-ack
y-ack / monster_names.asm
Last active February 21, 2017 21:06
replaced names
MonsterNames:
db "RHYDON@@@@"
db "KANGASKHAN"
db "NIDORAN♂@@"
db "CLEFAIRY@@"
db "SPEAROW@@@"
db "VOLTORB@@@"
db "NIDOKING@@"
db "SLOWBRO@@@"
db "IVYSAUR@@@"
@y-ack
y-ack / PokemonRedMapTools.ps1
Created March 19, 2017 21:40
Now I can edit map data in a text editor
#Use examples:
#Get-Content route1.blk | MapBytesToText -Width 10
#(Invoke-WebRequest https://raw.githubusercontent.com/pret/pokeyellow/master/maps/route1.blk).Content | MapBytesToText -Width 10
#Takes .blk files and outputs a table of tile block indexes I can actually work with
#The resulting format can be eaten by MapBytesToText to convert back into .blk
function MapBytesToText {
param([Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$True)][String]$File,
[Parameter(Mandatory=$False)][Int]$Width)
$Width = $Width*4
@y-ack
y-ack / highcompatSBS.txt
Last active October 18, 2021 13:24
Generates some kind of tree structure of an HTML document for CSS
How to read generated maps:
+-- is a branch. a branch will be a child of the parent element above it
Element details are in the format
+--name[.class][#ID][ (input type)][ :[href]][ :[target]]
element
.class
#ID
(input type)
:["href/target"]
<a class="wacky" id="mine" href="/away" thingsyoudontcareabout="t" value="900000"> would yield
@y-ack
y-ack / h.js
Last active February 14, 2019 01:25
disables web Discord's fucking ctrl-' call shortcut and badly placed button so I can stop scaring pixel
// ==UserScript==
// @name stop_scaring_pixel
// @namespace lumage.smilebasicsource.com
// @include https://discordapp.com/*
// @version 3.0
// @grant none
// @run-at document-end
// ==/UserScript==
var style = window.document.createElement('link');
@y-ack
y-ack / collapsingtoc.css
Last active November 14, 2017 19:01
org stuff
#toggle-table-of-contents {
display: none;
}
#toggle-table-of-contents ~ label {
text-decoration: underline;
}
#toggle-table-of-contents ~ label::before {
content: "hide ";
@y-ack
y-ack / layoutguides.js
Last active August 30, 2017 02:56
Adds rule of thirds and golden ratio guides to page innerHTML
var guidesRawHTML = `<style>
@media all and (orientation:portrait) {
.goldenratio {
transform: rotate(90deg);
transform-origin: 38% 60%;
width: calc(100vh + .5rem);
}
}
.layoutguide {
position: fixed;
@y-ack
y-ack / KlandScreenshot.ps1
Last active November 7, 2017 02:26
upload screenshots with powershell
function Upload-ToKland {
param([String]$bucket = "",
[String]$Image,
[String]$Url = "https://kland.smilebasicsource.com/uploadimage")
$ImageName = [regex]::Match($Image,"[^\\/]+\.(png|PNG|gif|GIF|jpe?g|JPE?G)").Value
$Image = [System.Text.Encoding]::GetEncoding("iso-8859-1").GetString([IO.File]::ReadAllBytes($Image))
$ImageType = [System.Web.MimeMapping]::GetMimeMapping($Image)
$boundary = [guid]::NewGuid().ToString()
@y-ack
y-ack / Untitled.ps1
Created November 10, 2017 02:46
Very dirty script used to generate JSON archives of miiverse
#$MiiverseList = Invoke-RestMethod "https://pastebin.com/raw/4kxfQWSH"
#$MiiverseList = $MiiverseList -split "`r`n"
$MiiverseList = dir .\chat_links | ? name -match "^AY" | select name
#$MiiverseList = @("https://miiverse.nintendo.net/replies/AYMHAAADAAB2V0e0LQKOBA")
#$SaveDirectory = "$home/miiverse"
$SaveDirectory = "$home/snail_miiverse"
mkdir $SaveDirectory
mkdir "$SaveDirectory/images/"
@y-ack
y-ack / AnalyzeLogs.ps1
Created November 10, 2017 05:12
SmileBASIC Source Log Graphing (files will be released slowly)
[Uri]$Domain = "http://scratch.smilebasicsource.com/chatlogs"
[Microsoft.PowerShell.Commands.HtmlWebResponseObject]$LogListDocument = Invoke-WebRequest $Domain
[Int32]$CurrentFileNum = 0
[Int32]$TotalFiles = $LogListDocument.Links.Count
[Regex]$DateRegexp = [Regex]'(\d\d-\d\d-\d\d)'
[Regex]$UserRegexp = [Regex]'\n *([a-zA-Z0-9_]+)\['
[String]$TAB = "`t"
[String]$UserData = "" # only users logged for each day
@y-ack
y-ack / START.PRG
Created February 9, 2018 01:07
smilebasic joke hello world "A Game About Anime"
CLS
DIM CONSHEIGHT%:CONSHEIGHT% = 30
DIM TITLE$,START$:TITLE$ = "a game about anime":START$ = "PRESS START"
GOSUB @INITTIMERS
TITLEPRINT TITLE$, 0, 0
EAT CREATETIMER("TEXTON", 40)
EAT CREATETIMER("TEXTOFF", 80)