https://lifthrasiir.github.io/roadroller/
Compresses JavaScript very effectively.
| <!doctype html> | |
| <head> | |
| <title>π Floating Logo with CSS</title> | |
| <style> | |
| .icon-shadow { | |
| width: 50px; | |
| margin-top: 1rem; | |
| box-shadow: 0px 0px 15px 5px #888; | |
| animation: grow 3s ease-in-out infinite; | |
| } |
https://lifthrasiir.github.io/roadroller/
Compresses JavaScript very effectively.
I was thinking about storing data in the URL which is probably not a unique idea, but I wanted to see how to implement it myself.
Compression can also be achived by combining two values to indicate repeating values. i.e. 55 = 5,5,5,5,5
Also storing data in URLs, but with a bigger range by converting text to Hex-like values using its character code.
A single character can be a number up to 73 and therefore, two characters can store numbers up to 5329.
Bytebeat music (or one-liner music) is a piece of rhythmic and somewhat melodic music with no score, no instruments, and no real oscillators.
After multiple discussions at work and among friends about making acronyms for words, I dug into it to build this minimal Letters to Words Technology Acronym Generator.
Given that you want to create a new acronym with your creative use of letters, you can create an acronym with randomly selected words.
Word list sources: (removed acronyms)
I keep receiving JSON data with odd characters so I made a small app that corrects all those issues and does an JSON.parse check to see if it passes. Parsing errors will display if any.
data:text/html,<h3>Clean JSON</h3><h5>Input</h5><textarea id=i></textarea><h5>Output</h5><textarea id=o></textarea><p id=err></p><script>i.onchange=_=>{o.value=v=i.value.replace(/[\u000B\u001C\u001D]/g, "").replace(/\u0019/g,"'").replace(/\u0013/g, "-");try{JSON.parse(v);err.innerHTML="Valid"}catch(e){err.innerHTML=e}}</script>Do you need to quickly generate random text?
Use this bookmarklet to quickly gen up some text. This uses words found in the keys of the window object and splits Camel-cased names and removes on at the start and single-character words. Then randomly puts 5-9 words into 5-9 sentences in 5-9 paragraphs.
Object.keys(window).reduce((a,b)=>[...a,...b.split(/^on|(?=[A-Z])/).filter(a=>a.length>1)],[])https://code.golf/arrows#javascript
p=[0,0]
arguments.map(g=>{[a,b]=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1],[0,0],[0,0]]["ββ²ββββ¦ββ°ββββ©βββ§ββ³ββββ¨ββ±ββββββ₯β₯".indexOf(g)/3>>0]
p[0]+=a
p[1]+=b
print(p.join` `)})I'm hoping this is interesting to somebody out there that likes code golfing or is interested in knowing what it looks like.
I saw a dweet with a lot of parts that I could add code golf techniques to. I was able to reduce the dweet from 150 to 131 bytes; a 19-byte reduction of code that does the same thing.
I golfed this (150b):
x.font="108pt _";x.fillStyle="#ffffff22";x.fillRect(0,0,1920,1080);x.fillStyle="#000";onmousemove=e=>x.fillText("dwitter",e.offsetX*3.1,e.offsetY*3.1)I love the new Helldivers 2 game and made a Dweet-sized version of Strategem Hero.
a="β¬
β¬β‘β¬"
t?c.width=99:n=b=0
x.fillText((s=[...Object.keys(this)[n]].map(v=>a[v.charCodeAt()%4]).join``).substr(b),1,9)
onkeyup=e=>a[(e.keyCode-5)%4]==s[b]&&++b>=s.length&&(b=0,n++)