Skip to content

Instantly share code, notes, and snippets.

Well, that's just sad. GitHub just became a hostage of Russian authorities.

Roskomnadzor (RKN) is an organ directly controlled by Government of Russian Federation. Its decisions are "autonomous" in a sense they do not depend on decisions of a court. They - or their supervisors - can freely decide what information in the web is legal and what is not, on the basis of the Federal Law of July 27, 2006 № 149-FZ "On Information, Information Technology and Information Security".

The law broadly defines exactly three areas of harmful and therefore illegal content:

  1. child porn;
  2. info on makng narcotics;
  3. descriptions of methods of commiting suicide.
@stevebest
stevebest / PooledConnection.java
Created February 18, 2014 07:34
PooledConnection.java
package censored;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
@stevebest
stevebest / randword.sh
Created January 23, 2013 08:21
Pick a random word from a dictionary
#! /usr/bin/env bash
WORDFILE="/usr/share/dict/words"
words=$(wc -l $WORDFILE | grep -oP "\d+")
r=$(((RANDOM * 32768 + RANDOM)%$words+1))
sed -n "$r p" $WORDFILE
@stevebest
stevebest / index.html
Created June 30, 2012 18:34
Yet another pseudo-scientific V8 performance test
<!doctype html>
<html>
<head>
<title>Yet another JS performance test</title>
</head>
<body>
<h1>Look at the console...</h1>
<table>
<thead>
@stevebest
stevebest / twitterbird.html
Created June 6, 2012 20:09
CSS3 Twitter bird
<!doctype html>
<html>
<head>
<style>
​.blue {
background: #52ade5;
}
​.white {
background: #fff;
@stevebest
stevebest / compilation-result.txt
Created October 11, 2011 04:51
Closure Compiler stress test aka "Dart Hello World compiled to JavaScript"
Original Size: 537.85KB (61.3KB gzipped)
Compiled Size: 31.5KB (9.09KB gzipped)
Saved 94.14% off the original size (85.17% off the gzipped size)
/*
* Prepend an `element` to a `list` with a fade-in effect
* using jQuery.
*/
$(list).prepend($(element).hide().fadeIn('slow'));
var Buffer = require('buffer').Buffer,
assert = require('assert');
// This string encodes single '.' character in UTF-16
// prepended with BOM (\ufeff).
var dot = new Buffer('//4uAA==', 'base64');
// These pass
assert.equal(dot[0], 0xff);
assert.equal(dot[1], 0xfe);