Skip to content

Instantly share code, notes, and snippets.

View sergiks's full-sized avatar

Sergei Sokolov sergiks

  • Russia | Europe | Thailand
View GitHub Profile
@sergiks
sergiks / index.html
Last active September 24, 2015 21:49
GET parameters in JavaScript
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="robots" content="">
@sergiks
sergiks / script
Created April 27, 2015 18:00
All combinations of at least two array elements
/**
* Test to figure out combinations of at least two elements of provided array.
*
* by Sergei Sokolov, [email protected], 2015 April 27, St. Petersburg.
* Fiddle: http://jsfiddle.net/sergiks/2ojgqxk1/
*/
function comb(a) {
var l, cursor, mask, tail, out=[];
l = a.length;
if( l<2 || l>32) {