r/tinycode • • Nov 15 '14

A friend asked if I could remove BuzzFeed links from his FaceBook feed

Thumbnail
github.com
27 Upvotes

r/tinycode • • May 11 '14

A HTML/JS spreadsheet in less than 256b

Thumbnail
xem.github.io
27 Upvotes

r/tinycode • • May 07 '14

does this count as tinycode? a 200k bootable .iso to play a text adventure

Thumbnail century-arcade.org
27 Upvotes

r/tinycode • • Mar 16 '14

clue: A tiny header-only C++03 logging framework (450 lines)

Thumbnail
github.com
27 Upvotes

r/tinycode • • Aug 19 '13

Dark Side of The Moon Cover in 453 Bytes of JS

Thumbnail jsfiddle.net
27 Upvotes

r/tinycode • • Dec 12 '12

Shortest useful code

27 Upvotes

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 • • Sep 09 '12

Tinycode challenge!

27 Upvotes

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 • • Jul 12 '12

Perl prime number testing regex

27 Upvotes
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 • • Apr 23 '12

Metaprogramming for madmen - A shooter in 96k

Thumbnail
fgiesen.wordpress.com
27 Upvotes

r/tinycode • • Jun 30 '11

A minimalistic forum in 666 bytes of PHP

Thumbnail
github.com
27 Upvotes

r/tinycode • • Sep 04 '26

JavaScript Dweet of the Week #141 - Uptown by KilledByAPixel

26 Upvotes

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 • • Feb 06 '26

JavaScript Dweet of the Week #111 - Rotating Raster Rings by dee-gomma

26 Upvotes

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 • • Mar 24 '21

Primality Test Using Regex

Thumbnail
theabbie.github.io
26 Upvotes

r/tinycode • • Feb 08 '20

Challenge: write a 16x16 block of JavaScript that animates itself

Thumbnail m-chrzan.xyz
26 Upvotes

r/tinycode • • Mar 29 '19

VM capable of running old-school OS in 70 sloc

Thumbnail
github.com
26 Upvotes

r/tinycode • • Dec 05 '18

Minesweeper game in 100 lines of pure JavaScript

Thumbnail
slicker.me
26 Upvotes

r/tinycode • • Dec 05 '17

Build a Regex Engine in Less than 40 Lines of Code

Thumbnail
nickdrane.com
26 Upvotes

r/tinycode • • Sep 26 '16

Build your own programming language in less than 200 LOC w/ Ohm & Node

Thumbnail
pubnub.com
26 Upvotes

r/tinycode • • Dec 30 '15

Obfusc-a-tweet reloaded: pack ~16kb of gzipped JS in a single tweet

Thumbnail
xem.github.io
26 Upvotes

r/tinycode • • Sep 15 '14

File sharing in 10 lines of Bash

26 Upvotes

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'`"
done

In 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.png

Let me know if you see ways it could be improved.


r/tinycode • • Dec 12 '13

Thomas Fuch's tweet-sized JavaScript templating engine

Thumbnail
mir.aculo.us
26 Upvotes

r/tinycode • • Jan 25 '12

Lisp in 32 lines of Ruby

Thumbnail
blog.fogus.me
26 Upvotes