Skip to content

Instantly share code, notes, and snippets.

Y.ack y-ack

  • Still in a Dream
Block or report user

Report or block y-ack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@y-ack
y-ack / monster_names.asm
Last active Feb 21, 2017
replaced names
View monster_names.asm
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 Mar 19, 2017
Now I can edit map data in a text editor
View PokemonRedMapTools.ps1
#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 Jun 3, 2017
Generates some kind of tree structure of an HTML document for CSS
View highcompatSBS.txt
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 / layoutguides.js
Last active Aug 30, 2017
Adds rule of thirds and golden ratio guides to page innerHTML
View layoutguides.js
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 Nov 7, 2017
upload screenshots with powershell
View KlandScreenshot.ps1
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 / AnalyzeLogs.ps1
Created Nov 10, 2017
SmileBASIC Source Log Graphing (files will be released slowly)
View AnalyzeLogs.ps1
[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 / Untitled.ps1
Created Nov 10, 2017
Very dirty script used to generate JSON archives of miiverse
View Untitled.ps1
#$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/"
View collapsingtoc.css
#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 / START.PRG
Created Feb 9, 2018
smilebasic joke hello world "A Game About Anime"
View START.PRG
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)
View 2018-04-11.ps1
#PowerShell: convert strings copied as integers back to byte-characters
function convertchars([uint32]$a){return [bitconverter]::GetBytes([uint32]$a) | %{[char]$_}}
You can’t perform that action at this time.