Posts

Showing posts from 2017

OpenShift kill hanging Jenkins pipeline job

It is possible to get zombie Jenkins job which is integrated in OpenShift. When you will run Groovy script to extract all jobs, possible you can't find any. What to do? Go into the JENKINS_HOME folder (usually /var/lib/jenkins). cd /var/lib/jenkins/jobs Co into failing job folder. cd my_job Remove all workspace forlders. rm -rf workspace* Remove hanging build folder in the builds folder. cd builds rm -rf 345 Restart Jenkins pod.

Docker DNS problem

Installed new version of the Docker, and suddenly was faced to a problem of not working DNS server. As usual I went to the /etc/default/docker, but found out that big changes occurred. Now to enable DNS should go in the different way: 1. Find company supported DNS servers: $ nmcli dev show | grep 'IP4.DNS' 2. Update /etc/docker/daemon.json: { "dns": ["10.0.0.2", "8.8.8.8"] } More information here

Socks proxy and Intelij

To run tests on remote server sometimes we need to go on it through jump server. At this case very helpful is the next command (creates SOCKS proxy pipe): ssh -D 1337 -f -C -q -N <jump server> -p 22 At this case to use socks proxy by JVM running tests, put next options -ea  -DsocksProxyHost=localhost  -DsocksProxyPort=1337 into the Edit configuration -> VM options pop-up.

Gyácsok Dzvinka, HORT SE, szabadidő gyermek 1 2008

Image

Can Google predict?

The search data acquired from Google Trends provides an insight into the the earlier stages of the process - where people are thinking about buying or selling, the paper argues. Taken from this article:   https://www.forbes.com/sites/timworstall/2014/08/04/big-data-using-google-searches-to-predict-stock-market-falls/#9bc5be373754

Pandas and read_clipboard problem

Working with data on Ubuntu was faced to a problem read data from a clipboard. Problem was solved by installing  xsel (sudo apt-get install xsel) Source :  http://catinsunshine.blogspot.hu/2017/04/solved-pyperclip-could-not-find.html

Mis-Measuring Our Lives

Image
Прочитав роботу групи економістів і статистиків під керівництвом Джозефа Стігліца "Невірно оцінюючи наше життя. Чому ВВП не відображає рівень добробуту". В книзі багато цікавого, крім того усі математичні розрахунки винесені в окрему гілку та наведені на сайті книги. Що я виніс для себе найціннішого? Ну звичайно, що ВВП не відображає добробуту нації. Щось можна отримати для аналізу з Чистого Отриманого Доходу домогосподарств. Найцікавішим для мене була концепція sustainability (стійкості добробуту).  Це важливий показник для кожної країни. Що ми залишаємо нащадкам? Зруйновану і корумповану економіку, знищене навколишнє середовище, корумповані школи ти університети, чи навпаки. Концепція проста для розуміння, проте лише невелика жменька націй дотримується ідеї прередачі дітям якісний економічних, екологічних та трудових ресурсів. Тут як паралель напрошується порівняння двох сімей благополучної та неблагополучної.

PostgreSQL and JSON

Image
Really good videos about JSON features of PostgreSQL:

Master the Game

Image
Закінчив читати на днях книгу Tony Robbins'а MONEY Master the Game: 7 Simple Steps to Financial Freedom. Книга сподобалася. Багатто в ній корисного матеріалу, є над чим і подумати. Автор вдало змалював економвчні завдання реальних людей. Можливо багато хто перечитавши текст зневажливо відкине питання власного пенсійного забезпечення, проте, на мою думку, країни з так званою солідарною системою несуть незрівннянно більшу загрозу для людини похилого віку, прожити залишок віку у бідності. Тож резюмуючи прочитанне, і максимально витискуючи 500 сторінок тексту, важливим для себе визначив наступні пункти: Кожен повинен будувати інвестиційний портфель( важливо не плутати інвестиції та спекуляції). Оптимальним за Реєм Даліо є наступне співвідношення активів: Акції - 30% Довгострокові американські облігації - 40% Золото - 7.5% Сировина - 7...

Films

I want to share my best films about business and corporations. Enron: The Smartest Guys in the Room The Big Short Inside Job

Hibernate 5 and entity mapping error

It could happen when you use Hibernate 5, that you will get entity not found error. Exception in thread "main" org.hibernate.MappingException: Unknown entity: com... Surprise, cause mapping is declared in hibernate.cfg.xml. The problem can be fixed by creating session factory in other way:   SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

The Lord of Bubbles

Image
The One Country Lord lost popularity, because he tried to gain only it. He asked own wizards, - "What I should do? Please, give me an advice. Events must be profitable and give me popularity." Wizards guessed a lot but didn't came up with a solution. They always did stupid, expensive events. So they came to very old Goblins wizard and asked him a help. He told,- "Bubble." "Bubble?!", - asked supersized wizards. "Yes, you can blow up bubbles. they will give you popularity, and they are extremely profitable",- respond Goblin's wizard. This idea looked beautiful for wizards, so they share it with the One Country's Lord. He do loved it. He awarded own wizards with titles, and started to blow bubbles. He blow the first - Real Estate Bubble. He blow the second - Migrants Bubble. He blow the third - Brussels Bubble. The One Country's Lord and his wizards were happy and become richer and richer. But people become poor and...

SyntaxHighliter

From long time I use SyntaxHighliter to highlight code snippets in my blog. This is JavaScript application which can be easily inserted into Blogger template you have. It supports a big variety of programming languages syntaxes. For detailed information I would recommend SyntaxHighlighter site. For usage CraftyFella's Blog . More information about different code highlighters is here .

VirtualBox and Secure Boot

If you run Linux with secure boot you can get problems working with VirtualBox. VirtualBox requires special modules which should be added to the kernel in the boot time. It happens that this modules are not recognized as native on the boot so they are rejected. To enable this modules they have to be signed by secure key. First of all, you have to generate a key: openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/" Than, sign required modules. Hereby is a code snippet you can use to solve this problem: for f in $(dirname $(modinfo -n vboxdrv))/*.ko; do echo "Signing $f"; sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $f; done sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv) sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxguest) ...

EJB local method call

When we call local EJB method inside other local method this logic is not intersected by container, so no transaction context are invoked. Good article about this is here .