Skip to content

Instantly share code, notes, and snippets.

View noroutine's full-sized avatar
🌴
First interview should be a hit, not a miss!

Oleksii noroutine

🌴
First interview should be a hit, not a miss!
View GitHub Profile
@Configurable
public class ApplicationFormattingConversionServiceFactoryBean
extends FormattingConversionServiceFactoryBean {
/.../
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
installLabelConverters(getObject());
@noroutine
noroutine / virtualenv-auto-activate.sh
Last active November 14, 2015 06:32 — forked from codysoyland/virtualenv-auto-activate.sh
automatic python virtual env activation and deactivation
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@noroutine
noroutine / gist:c32eb6a0d8b8dc428683
Last active February 16, 2016 08:45
go tree walk
package main
import (
"math/rand"
"fmt"
"time"
)
type Tree struct {
Left *Tree
http://stackoverflow.com/questions/23044855/what-is-the-reason-golang-discriminates-method-sets-on-t-and-t
https://tour.golang.org/list
https://blog.golang.org/defer-panic-and-recover
https://blog.golang.org/go-slices-usage-and-internals
https://blog.golang.org/generate
https://blog.golang.org/strings
https://golang.org/ref/spec#Length_and_capacity
http://golangprojects.com/
https://golang.org/pkg/fmt/#Printf
@noroutine
noroutine / dominion_p2p.go
Last active February 26, 2016 16:37
Dominion P2P structures
/**
Computed game state
*/
type GameState struct {
Copper, Silver, Gold int64 // amount of gold cards of value 1, 2 and 3 respectively
V1, V3, V6 int64 // amount of victory cards fo value 1, 3, 6 respectively
Actions map[string] int64 // amount of 10 action cards from the game box
Curse int64 // amount of curse cards
Trash []string // trash deck
}
https://www.youtube.com/watch?v=ATRZqJXBxVc
https://www.youtube.com/watch?v=AQNMCgKvOk0
public class Quicksort
{
public static void main(String[] args) {
int a[] = new int[] {
10, 4, 4, 8, 0, 8, 9, 7, 3, 7, 6
};
Quicksort.sort(a);
for (int e: a) {
# Sample makefile
SHELL=/bin/bash
CC=gcc
CFLAGS=-O2
.PHONY: all
all: example0
%: %.c
@noroutine
noroutine / Контраргументи.md
Created January 30, 2017 00:27
Контраргументи

Шпаргалка контраргументів для мовних дискусій

#. Аргумент "І так поймут" нікчемний Мови - природний культурний маркер і тому це питання національної безпеки. Еволюційно виживають країни з єдиною монолітною мовою й культурою. Хоч винятки є - випадки двомовних країн - не варто брати винятки за правило. Простіше кажучи, у нас більше шансів залишитися країною в наступні 100 років, якщо ми плекатимемо й розвиватимемо власну мову та культуру - це на віки Війні з Росією передували сумнозвісний закон КК та численні випадки утисків саме україномовних (наприклад, http://www.radiosvoboda.org/a/2279366.html)

#. Аргумент "Насильницька українізація" нікчемний Захист та підтримка державної мови не значить переслідування російськомовних Нормальна європейська практика - це країна з однією державною мовою, де отримання посвідки на постійне продивання (не громадянство) не проходить без демонстрації знання мови. І ніхто там з вами не панькається, хоча є приємні винятки (які не варто брати за правило)

Vagrant.configure("2") do |config|
config.vm.box = "boxcutter/ubuntu1604-desktop"
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024
vb.customize ["modifyvm", :id, "--accelerate3d", "off"]
vb.customize ["modifyvm", :id, "--monitorcount", "1"]
end
config.ssh.insert_key = false
end