Skip to content

Instantly share code, notes, and snippets.

@xem
xem / draft.md
Last active August 29, 2015 14:00
Character encodings on the Web

Introduction

Every single component of the Web handles strings, and especially Unicode characters encoding, differently.

This document aims to gather all the important information about character encodings on the Web.

File charsets

@xem
xem / README.md
Last active December 30, 2015 17:39 — forked from 140bytes/LICENSE.txt
A full HTML/CSS/JS editor fitting in a single tweet
@xem
xem / README.md
Last active May 15, 2016 17:31 — forked from 140bytes/LICENSE.txt
Challenge: encode / decode 400 (or more) ASCII characters in a single tweet!

Hi,

A tweet can contain 140 UTF-16 characters.

An UTF-16 character can be composed of 2 16-bits surrogates.

A UTF-16 surrogate can be used to store 10 bits.

An ASCII character is 7 bits long.

@xem
xem / An-Anonymous-Pen.markdown
Created November 5, 2013 10:23
A Pen by Secret Sam.
@xem
xem / LICENSE.txt
Last active June 16, 2021 00:05 — forked from 140bytes/LICENSE.txt
Challenge: Executing more than 140 JS characters in a tweet!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@xem
xem / LICENSE.txt
Last active December 25, 2015 14:19 — forked from 140bytes/LICENSE.txt
Snail matrix generator
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@xem
xem / gist:6809574
Last active December 24, 2015 13:59

document.getelementById can be omitted in all major browsers, inclunding IE6+. This is non-standard, but all of them save the elements ids as globals.

<div id="myId"></div>
<script>
  alert(myId.id);         // --> myId
  alert(window.myId.id);  // --> myId
</script>
@xem
xem / LICENSE.txt
Last active November 20, 2023 13:51 — forked from 140bytes/LICENSE.txt
Mini Game of Life
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@xem
xem / LICENSE.txt
Last active December 16, 2015 18:19 — forked from 140bytes/LICENSE.txt
CSS mini minifier 0.7
WTFPL
@xem
xem / LICENSE.txt
Last active December 16, 2015 17:40 — forked from 140bytes/LICENSE.txt
CSS mini minifier 0.6
WTFPL