e0ne's comments

Internal Bash Variables

Published at March 4, 2019 ·  1 min read

I didn’t pay attention to some variables I used in bash script before. I just realized that there are a lot of variables I don’t see in the output of env or export commands. There a lot of internal bash variables you can use or change. I don’t have a lot of bash scripts in my sources. Usually, I don’t write scripts bigger than 10-20 lines. TBH, most of scripts are copy-pasted from somewhere with minor changes....

Clone Your GitHub Repos

Published at March 3, 2019 ·  1 min read

Since GitHub allows to store unlimited private repositories, I moved everything there. It’s really great to have such sources storage for free. Once I pushed everything to GitHub, I need to sync my repositories over all environments I have. I wrote a simple Python script below to clone all my GitHub repositories: My use case could not fit everyone, but you can adjust my script to cover your use cases....

Vue.js Components Registration

Published at March 2, 2019 ·  2 min read

I can’t add anything from the technical point of view to the official documentation but I would like to drop a few lines about local vs global components registration. Global registration I prefer to use it mostly for the 3rd-party libraries which are used a lot. E.g. vue-fontawesome, bootstrap-vue, etc. It’s reasonable to use global registration for own components if they are used on the most pages. Local registration I think it’s reasonable to use it as a default solution for component registration....

Dynamic method generation with default arguments

Published at March 1, 2019 ·  2 min read

NOTE: please, be sure that you really need such things in your project. It could be useful if you understand how it works. You can also spend hours or even days to understand what is going wrong if you don’t understand how method generation works in the project. NOTE: this post is based on OpenStack Horizon integration tests. We use method generation in our tests framework to generate methods like ‘go_to_some_page’....

TypeScript: forgot to compile

Published at February 28, 2019 ·  1 min read

I’m working too much time with script languages like Python, JavaScript, and even bash. I almost forgot that sometimes I need to compile my sources. A stupid mistake was made on TypeScript project I’m working on: I didn’t add a job on CI which will compile sources to JavaScript. Of course, I use npm run build build to make a production bundle. I see TypeScript compile errors in my console when I run the code....

Dependencies List for My Project

Published at February 27, 2019 ·  1 min read

Time to time you need to get all dependencies for a project you work with. It’s good if you have an up-to-date list in the requirements.txt file. In another case, you can always use pip freeze command in your virtualenv. It provides a flat list of all installed dependencies. To get the dependencies tree, it’s I use pipdeptree package. It provides a simple CLI tool to get dependencies tree with version constraints for packages where they are specified....

Cast JavaScipt object to TypeScript classes

Published at February 26, 2019 ·  2 min read

TypeScript could give you a false hope that I’ve got a strong-typed code and everything will work as expected with JavaScript. In reality, TypeScript doesn’t do anything after sources are compiled to JavaScript. It means, in runtime, you’ll face good-known JavaScript with it dynamic typing. The lack of any runtime type checking is a big minus for TypeScript. You’ll lose all your type at the same moment when browser executes code....

Keep Your Tests Clean: Refactoring

Published at February 25, 2019 ·  1 min read

Refactoring tests could be painful a lot. But it could also give you a lot of fun too. During refactoring unit tests, I’ve found a log of issues to be resolved. Also, it gives me more knowledge about how the project works. Refactoring tests could be harder than refactoring rest of code because it could affect not only tests. Since there are no tests for tests, there is only one way to understand if refactoring didn’t lead to less test coverage....

Run Django Tests in Parallel

Published at February 24, 2019 ·  2 min read

I’m wondering that in 2019 we still have a lot of tasks which are not parallelized yet. I’m pretty sure, that almost all laptops, desktops and even smartphones have more than one core on board. In the meantime, I just realized that Django runs tests using only one process/core on my desktop. I’m disappointed but I think I know why it happens. Many of us are not used to write concurrent code....

Flask Upgrades Support

Published at February 23, 2019 ·  1 min read

Upgrading flask-based project from flask v.0.12.x to 1.0.x I realized that Flask itself doesn’t ready for upgrades yet. There is no documentation about 0.x -> 1.0 upgrade at all. There is some documentation about upgrades prior 1.0 but nothing about 1.0 at all! Change log isn’t helpful a lot. It’s one more argument to use Django instead of Flask. It has great release notes with detailed backward incompatible and deprecation sections....

Tags

.net .net-framework .net-framework-3.5 agile ajax ajax-control-toolkit ampq ansible apache asp.net asp.net-mvc automation axum babel bash benchmark blog blog-engine bootstrap buildout c# cache centos chrome ci cinder ckan cli cloud code-review codeplex community config debugger deface dependencies development-environment devices devstack devtime disks django dlr dns docker dockerimage dos easy_install elmah encoding environment-variables error event events everything-as-a-code exception exceptions fabrik firefox flask foreach forms fstab gae gcc gerrit git github go google google-app-engine grep hack hacked hardware headless horizon hound html hugo iaas ienumerable iis internet iptables iron-python ironic iscsi java-script javascript jenkins jquery js jsx kharkivpy kiss kombu kvm kyiv lettuce libvirt linux lio loci logging loopback losetup lvm mac-os macos mercurial microsoft microsoft-sync-framework mobile mono ms-office msbuild networking news nginx npm npx offtopic oop open-source open-xml opensource openstack openvswitch os packages paraller-development patterns-practices performance php pika pip plugins pnp podcast popup postgresql profiler project protocols proxy pycamp pycharm pycon pykyiv pylint pypi python python-3 qcow quantum qumy rabbitmq rar react reactjs refactoring rfc rhel search-engine security selenium server shell silverlight socket software-engineering source-control sourcegear-vault sources sql sql-server sql-server-express sqlalchemy ssh static-site sublimetext svg tests tgt tipfy tornado typescript uapycon ui uneta unit-tests upgrades usability vim virtualenv visual-studio vitrage vm vue.js vuejs web-development web-server web-service web_root webpack webroot windows windows-live word-press x32 x64 xcode xml xss xvfb интернет-магазин книги


Archives

2019 (73)
2018 (2)
2017 (3)
2016 (2)
2015 (3)
2014 (5)
2013 (17)
2012 (22)
2011 (35)
2010 (25)
2009 (35)
2008 (32)
2007 (2)