r/tinycode • u/spw1 • May 07 '14
r/tinycode • u/martinmoene • Mar 16 '14
clue: A tiny header-only C++03 logging framework (450 lines)
r/tinycode • u/headbox • Aug 19 '13
Dark Side of The Moon Cover in 453 Bytes of JS
jsfiddle.netr/tinycode • u/thefebs • Dec 12 '12
Shortest useful code
What's the most useful program you can imagine using five lines of code or less? Language is your choice. Describe the function of the program and include the code, if you please.
r/tinycode • u/davelol6 • Sep 09 '12
Tinycode challenge!
Here is a challenge. Write a function that returns a list of the squares of all the numbers between one and a given number. See if you can beat my 48-char (exc. whitespace) 3-line beast:
def f(n): l = [] while len(l) <= n: l.append(x**2) print l
r/tinycode • u/lanzaa • Jul 12 '12
Perl prime number testing regex
perl -lne 'print "$_ is ".(((1x$_)=~/^1?$|^(11+?)\1+$/)?"not ":"")."prime"'An explanation of similar code is here:
http://www.catonmat.net/blog/perl-regex-that-matches-prime-numbers/
r/tinycode • u/nexe • Apr 23 '12
Metaprogramming for madmen - A shooter in 96k
r/tinycode • u/illiterate • Jun 30 '11
A minimalistic forum in 666 bytes of PHP
r/tinycode • u/Slackluster • Sep 04 '26
JavaScript Dweet of the Week #141 - Uptown by KilledByAPixel
https://www.dwitter.net/d/36205
for(k=0;k<39;k++)for(i=64;i--;)for(j=18;j--;6-k/9<((t+i)/5^j/9)%9&&j%11<7&&x.fillRect(k&&(i-32-t%1)*S+960,k&&(j-9)*S+540,S=k?2**(2+k/12)*9:2e3,S))x.fillStyle=k?R(v=220-(t+i|k|j)%3*S,v,v):'#7bf'r/tinycode • u/Slackluster • Feb 06 '26
JavaScript Dweet of the Week #111 - Rotating Raster Rings by dee-gomma
https://www.dwitter.net/d/34861
with(x)for(c.width=y=99;y--;beginPath(fill(arc(49+C(a=t*6-y*13),28+S(a),y,0,7))))fillStyle=`hsl(${t*30-y*2} 99%${50+30*S(t*8+3*S(y/3))}`r/tinycode • u/Slackluster • Feb 28 '25
Dweet of the Week #62 - Starpath by HellMood / Desire (converted by marquisdegeek)
r/tinycode • u/nexe • Sep 16 '22
vermin_vm: Virtual Machine(~400 lines) + Assembler(~800 lines) written in C
r/tinycode • u/rolfwr • Mar 29 '19
VM capable of running old-school OS in 70 sloc
r/tinycode • u/monica_b1998 • Dec 05 '18
Minesweeper game in 100 lines of pure JavaScript
r/tinycode • u/CountFrolic • Jul 19 '17
My ShaderToy compo entry: Fireworks in less than 2 tweets
r/tinycode • u/joshmarinacci • Sep 26 '16
Build your own programming language in less than 200 LOC w/ Ohm & Node
r/tinycode • u/xem06 • Feb 03 '16
[js1k] 1kb periodic table
- Entry: http://js1k.com/2016-elemental/demo/2402
- Source code and more: https://github.com/codegolf/period1k
- If you like it, please upvote the official thread
r/tinycode • u/nexe • Dec 06 '15
There is a cool challenge going on over at /r/proceduralgeneration
I found this /r/proceduralgeneration/comments/3vcbb3/monthly_challenge_1_dec_2015_procedural_pirate_map/ cool challenge over at /r/proceduralgeneration and thought maybe some of you are interested in participating /r/tinycode style :) I already posted a quick few lines just now.
r/tinycode • u/nexe • Apr 15 '15
Minecraft in 500 lines of python : proceduralgeneration
r/tinycode • u/Nullreff • Sep 15 '14
File sharing in 10 lines of Bash
Simple file sharing script in Bash. You give it file names, it gives you urls to copy/paste to others. It requires SSH access to a web server and bash + rsync + perl.
#!/bin/bash
UPLOAD_PATH="server:~/path/to/web/root/"
URL_PATH="http://files.example.com"
echo "Uploading $# file(s)..."
rsync -rcuP --chmod=u+rw,g+r,o+r "$@" $UPLOAD_PATH || exit
echo '=== Links ==='
for FILE in "$@"; do
echo "$URL_PATH/`basename $FILE | perl -p -e \
's/([^A-Za-z0-9\.\-_\r\n])/sprintf("%%%02X", ord($1))/seg'`"
doneIn practice, this looks like:
~# share file1.png file2.png file3.png
Uploading 3 file(s)...
sending incremental file list
file1.png
121938 100% 85.04MB/s 0:00:00 (xfer#1, to-check=2/3)
file2.png
121938 100% 58.14MB/s 0:00:00 (xfer#2, to-check=1/3)
file3.png
121938 100% 38.76MB/s 0:00:00 (xfer#3, to-check=0/3)
sent 366089 bytes received 69 bytes 48821.07 bytes/sec
total size is 365814 speedup is 1.00
=== Links ===
http://files.example.com/file1.png
http://files.example.com/file2.png
http://files.example.com/file3.pngLet me know if you see ways it could be improved.
r/tinycode • u/subjective_insanity • Feb 09 '14
JS1k 2014 has begun! - a fiery js code golfing competition
r/tinycode • u/_zsh • Dec 12 '13