Skip to content

Instantly share code, notes, and snippets.

View mishin's full-sized avatar
💭
if you fail to prepare you prepare to fail

Nikolay Mishin mishin

💭
if you fail to prepare you prepare to fail
View GitHub Profile
@jasonkeene
jasonkeene / java-concurrency-in-practice-notes.md
Last active September 25, 2022 23:15
Java Concurrency In Practice

Preface

  • Read on the train, no notes.

Chapter 1 - Introduction

  • Read on the train, no notes. Basic introduction to concurrency concepts.

Chapter 2 - Thread Safety

@aragozin
aragozin / setup.txt
Last active September 12, 2022 18:55
JMC Workshop Notes
clone https://github.com/aragozin/optaplanner-bench.git
git checkout jmc_workbench_0
mvn package
mvn -P ui exec:java
Disable some JVM optimizations
MAVEN_OPTS=-Xmx512m -XX:+NeverActAsServerClassMachine -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:-DoEscapeAnalysis
mvn -P mrbench exec:java
#include<stdio.h>
int main()
{
int i,j,k;
int h=7,t=3,l=5;
for(i=1;i<=(t/2)+1;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
module InterchangeHelper
def retina_image_tag(default_name, options={})
retina_name = default_name.gsub(%r{\.\w+$}, '@2x\0')
image_tag(default_name, options.merge('data-interchange' => "[#{asset_path(retina_name)}, (retina)]"))
end
end
#!/usr/bin/perl
use Benchmark qw(:all);
use Storable;
use Clone;
use CBOR::XS;
use Data::MessagePack;
use Panda::Lib;
use Sereal;
use Sereal::Dclone;
library(reshape)
library(ggplot2)
id = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
# Clean build, no Gradle daemon
java_clean_nodaemon = c(24.831, 26.247, 24.109, 23.338, 24.567, 25.349, 23.388, 24.930, 22.830, 25.635)
kotlin_clean_nodaemon = c(30.936, 33.065, 35.062, 31.953, 31.666, 33.907, 31.047, 31.104, 32.922, 32.150)
# Clean build, Gradle daemon running
@dallaylaen
dallaylaen / todo.t
Last active August 25, 2017 09:01
Make Perl module developer feel bad about untested code
#!/usr/bin/env perl
# This script tests nothing (except the fact that modules load w/o warnings).
# However, it tries to load them all.
# This means that untested modules would also be included into
# code coverage summary, lowering total coverage to its actual value.
# I.e. having a well-covered module and a totally uncovered one will result
# in 50% coverage which is probably closer to truth.
If we want to convert svn repository to git we do next:
````
git svn clone --authors-file=authors.txt --no-metadata http://vcs/svn/ESB/ESB.Report/trunk ESB.Report
````
after that we got the following link:
````
git@server.main.mycompany.ru:ESB/esb-creport.git
````
than we create repository in git (gitlab):
@RaD
RaD / throttle.py
Created July 15, 2016 11:37
Написал на память декоратор, который ограничивает количество вызовов обёрнутой функции за указанный период времени.
#!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
import functools
import time
class throttle(object):
u"""Ограничивает количество вызовов обёрнутой функции за указанный период времени."""
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use feature 'say';
use utf8;
use open qw(:std :utf8);
use Carp;
use HTTP::Tiny;