Skip to content

Instantly share code, notes, and snippets.

@ignovak
ignovak / whitespace.js
Last active October 24, 2016 00:17
Whitespace Interpreter
// https://www.codewars.com/kata/52dc4688eca89d0f820004c6/
class Stack {
constructor() {
this.stack = []
}
push(x) {
return this.stack.push(x)
}
pop() {
if (!this.len) throw Error
@ignovak
ignovak / rate.html
Created December 17, 2014 12:47
jsless implementation of rate stars
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Rate</title>
<style>
.stars {
position: relative;
display: inline-block;
}
.star {
float: left;
color: #aaa;
border-style: solid;
border-color: currentColor transparent;
border-width: 8px 10px 0;
margin-top: 6px;
transition: all 0.15s ease-in-out;
}
.star::before,

Заголовок теста

Задачи с вариантами ответов

Решите квадратные уравнения

Выберите правильное решение квадратного уравнения:

  1. $3x^2-5x+2=x^2+x+2$
  2. 2; 3
  3. 4; 5
  4. 1; -2
@ignovak
ignovak / dabblet.css
Created December 23, 2013 12:15
Untitled
body {
font-size: 48px;
font-family: arial;
}
p {
margin: 0
}
@ignovak
ignovak / dabblet.css
Created December 7, 2013 11:21
Untitled
.main {
height: 300px;
display: flex;
justify-content: center;
align-items: center;
}
.box {
background: #000;
box-shadow: 0 0 0 50px;
@ignovak
ignovak / dabblet.css
Created October 6, 2013 21:04
clearfix
/**
* clearfix
*/
.left, .right {
width: 200px;
margin: 20px;
}
.left {
var css = [
["background: url('pic.png');", "background: url('../../common.blocks/pic/pic.png');"],
["background: #fff url('pic.png');", "background: #fff url('../../common.blocks/pic/pic.png');"],
["background: url('pic.png') #fff;", "background: url('../../common.blocks/pic/pic.png') #fff;"],
["background: url('http://ya.ru/pic.png');", "background: url('http://ya.ru/pic.png');"],
["background: url('//ya.ru/pic.png');", "background: url('//ya.ru/pic.png');"],
["background-image: url('pic.png');", "background-image: url('../../common.blocks/pic/pic.png');"],
["background: url('pic.png');background: url('pic.png');", "background: url('../../common.blocks/pic/pic.png');background: url('../../common.blocks/pic/pic.png');"],
["background: url(pic.png);", "background: url(../../common.blocks/pic/pic.png);"],
#!/usr/bin/env python
#-*- coding: utf-8 -*-
class Board():
def __init__(self, chars=[]):
self.SIZE = 8
self.board = [[0 for i in range(self.SIZE)] for i in range(self.SIZE)]
self.CHARS = {
'Q': self.__queen,