<commit_before>410 in 140
==========
A Twitter API v1 server implemented in 140 characters (or less).

Motivation
----------
On March 5, 2013, [Twitter deprecated version 1 of their API][sadness]. At some
unspecified time in the future, API v1 requests will start returning `HTTP 410
Gone`. This project aims to implement a web server for this endpoint in 140
characters (or less), so it fits in a Tweet.

[sadness]: https://dev.twitter.com/blog/planning-for-api-v1-retirement

Running the server
------------------
	sudo ruby server.rb

**Note**: Must be run as root since it binds to port 80. If it's not run as
root on a Unix-like operating systems, you will get the error:

	server.rb:2:in `initialize': Permission denied - bind(2) (Errno::EACCES)

Running the specs
-----------------
There is currently only one spec, which verifies that the size of server.rb is
less than or equal to 140 characters.

	rspec spec.rb

FAQ
---
> Are you serious?

No, not particularly. [I was trying to be funny][tweet], but [someone<commit_msg>Add the source code to the README<commit_after>410 in 140
==========
A Twitter API v1 server implemented in 140 characters (or less).

Motivation
----------
On March 5, 2013, [Twitter deprecated version 1 of their API][sadness]. At some
unspecified time in the future, API v1 requests will start returning `HTTP 410
Gone`. This project aims to implement a web server for this endpoint in 140
characters (or less), so it fits in a Tweet.

[sadness]: https://dev.twitter.com/blog/planning-for-api-v1-retirement

Life is short. Don't make me click. Just show me the code!
----------------------------------------------------------
Okay.

```ruby
require 'socket';
s = TCPServer.new(80);
loop {
	Thread.start(s.accept){|c|
		c.gets "\n\n";
		c.puts "HTTP/1.1 410 Gone\r";
		c.close
	}
}
```

Running the server
------------------
	sudo ruby server.rb

**Note**: Must be run as root since it binds to port 80. If it's not run as
root on a Unix-like operating systems, you will get the error:

	server.rb:2:in `initialize': Permission denied - bind(2) (Errno::EACCES)

Running the specs
-----------------
There is currently only one spec, which verifies that the size of server.rb is
less than or equal to 140 characters.

	rspec spec.rb

FAQ
---
> Are you serious?

No, not particularly. [I was trying to be funny][tweet], but [someone
{'fraction_non_alphanumeric': 0.15368331922099915, 'fraction_numerical': 0.029212531752751906, 'mean_word_length': 2.978114478114478, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1285716', 'n_tokens_mistral': 779, 'n_tokens_neox': 684, 'n_words': 326}