Skip to content

Instantly share code, notes, and snippets.

Looking for a job

Sergey Ponomarev stokito

Looking for a job
View GitHub Profile
View Project1.pas
program Project1;
A: array of Integer; // массив целых чисел
View DataSource.groovy
environments {
development {
dataSource {
configClass = com.example.OverrideGrailsDomainConfiguration
View BeerSpec.groovy
import spock.lang.Specification
import spock.lang.Unroll
A programmer drinks exactly goalPints of beer every evening.
One evening, the programmer opens his fridge and sees a number of smallBottles of beer (1 pint each) and a number of bigBottles of beer (3 pints each).
The programmer needs to decide whether he can pick some bottles and start drinking, or has to run to the store to buy some more bottles.
The programmer is "greedy" and never consumes a bottle partially.
Write a Java-method which returns true if it is possible to make the goal by choosing from the given (whole) bottles, or false otherwise.
Note that it is not necessary to "take" all bottles — some may remain unused.
View check.c
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <crypt.h>
To compile:
$ gcc check.c -lcrypt -o check
$ ./check
stokito / pom.xml
Last active Dec 5, 2017
Example of creation symlink to target folder on Windows. symlink may be to another partion with more space or even in memory (that increases build speed up to 20%)
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
View gist:19e377c872dd85ee4445eabce97fa2e8
> imdisk -h
Control program for the ImDisk Virtual Disk Driver.
For copyrights and credits, type imdisk --version
imdisk -a -t type -m mountpoint [-n] [-o opt1[,opt2 ...]] [-f|-F file]
[-s size] [-b offset] [-v partition] [-S sectorsize] [-u unit]
[-x sectors/track] [-y tracks/cylinder] [-p "format-parameters"] [-P]
imdisk -d|-D [-u unit | -m mountpoint] [-P]
imdisk -R -u unit
View placeholder.css
placeholder-xs class to show placeholder with field name for mobile phones but to hide and show label instead on larger screens.
Media for bigger devices than phones (tablet, laptops larger than 767px)
@media (min-width: 768px) {
.placeholder-xs::-webkit-input-placeholder { /* Chrome */
color: transparent;

Keybase proof

I hereby claim:

  • I am stokito on github.
  • I am stokito ( on keybase.
  • I have a public key ASCpL3KIIhac4IjEIhLojZyzFSqceSuBLJaf08RZXn4sXQo

To claim this, I am signing this object:

stokito /
Created Nov 11, 2017
StacktracePatternLayout: LOG4J pattern enhanced for stacktraces
package com.example;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.helpers.PatternConverter;
import org.apache.log4j.helpers.PatternParser;
import org.apache.log4j.spi.LoggingEvent;
package util;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
public class XMLEscaper {
public static final String[] ESCAPED_CHAR = {"&", "'", "\"", "<", ">"};
public String escape(String aText) {
if (aText == null) return null;