January 18, 2021

 

Blog is now hosted at https://shamil.gumirov.org

Blog is now hosted at shamil.gumirov.org . Soon blogger.com blog instance will be shut down and replaced with new blog at this domain.

Labels:

December 8, 2020

 

Blog is moving soon and "beta" announcement

My blog will move from blogger (used since 2006) to be a self-hosted, built with hugo.io. Address and domain will remain the same: shamil.gumirov.com. Currently a "beta" is launched (UI is not yet final and will be changed - waiting for a professional designers' feedback). Welcome to check it out!

The new blog is sharing a CI/CD built for my self-hosted services (like Jabber server, Blog, Mail, Jitsi meet, Mumble and others). Currently I use a Gitlab-based deployment with an orchestrator repo, makefile per service and private docker registry for container images. All services are containerized for isolation and ease of moving around. It's grown evolutionary, but resembles a k8s, so I've plan to move to k8s, maybe in end of December.

I've patched blog2md to correctly export comments too, see details. All 220 posts in the hugo-based blog are exported from blogger using this, without much modifications afterwards. Some are still needed, mostly related to preformatted code from pre blocks. I did not made match to blog2md yet and not sure if I will ever as they're pretty minor.

Labels: , , , , , , , , ,

April 8, 2020

 

Sudoed podman cannot listen to privileged ports

Edit: This issue is possibly a known one: see "Podman can not create containers that bind to ports < 1024"

It's impossible to reach any exposed privileged port from external net when running podman

sudo podman run -p 80:80 -it nginx
Setup: dedicated Centos 8, clean install + docker, no firewalld, iptables at "allow-all" default ruleset. With docker however it works without problem.

What I was trying to run which needed to listen to privileged ports is a certbot inside docker. Motivation is to avoid installing python dependencies or else downloading and running unknown binary.

Labels: , , , , , , ,

April 4, 2020

 

Fresh centos8 podman/buildah issues related to alpine

Lately I'm trying out Centos 8 and move to openshift with podman and buildah as docker replacements. So far not without interesting problems!

In a freshly installed updated centos8 it's impossible to build any alpine-based repo or even pull alpine itself:

$ podman pull alpine
...
Error committing the finished image: error adding layer with blob "sha256:aad63a9339440e7c3e1fff2b988991b9bfb81280042fa7f39a5e327023056819": Error processing
tar file(exit status 1): there might not be enough IDs available in the namespace (requested 0:42 for /etc/shadow): lchown /etc/shadow: invalid argument

The following solution is mentioned in libpod issue 2788:
# dnf reinstall shadow-utils
I did not investigate this deep down, however seem capabilities are set wrong for shadow-utils with yum installation (yum reinstall does not fix this):
$ getcap /usr/bin/newuidmap /usr/bin/newgidmap
Here's expected output for the command above:
/usr/bin/newuidmap = cap_setuid+ep
/usr/bin/newgidmap = cap_setgid+ep

Labels: , , , , , ,

February 15, 2020

 

Google's fake security procedures

Sometimes Google locks my secondary accounts (email at my own domain), only to ask then to "confirm it's you" via SMS to phone. But there's no security phone registered for that account! So the procedure is:
  1. Lock account.
  2. On log in, check for password and then ask for phone.
  3. Accept OTP via any phone. Note: the phone is not stored as security phone! It's only one time random phone.
Hey, Google, what's the point in that? It's clearly not for security. Is that all to verify that my Jira sending-mail account is not bot? Well, I got news: it's bot, actually. And I need it. And seems you don't like that fact.

So I expect more problems with using gmail to send automatic notifications from my small service installations like personal devops. This means it's much better to discover and move to custom mail server from Gmail. Sounds like a paradise: no more worrying on email account locking, no more "look into spam folder". This is how email is supposed to work :)

The only real big problem is that Google is actually implements fake security, with fake like in "fake news". Something in the shell called "security" but not actually that. So it lies its users covering intentions with "security" topic, like "we've blocked your account to increase security". Or wait, that's not account's security, but a Google one (like secure our infrastructure with getting rid of bots)?

Labels: , , , ,

January 20, 2020

 

On work processes

I've started to read about Spotify model. Very interesting, and I will write summary on it when I have a clear picture.

The remark is very right, it's from Spotify's videos on the topic:
"healthy culture heals broken process".

So the organizational hierarchy of company values should be:

culture > process > work

The culture cannot be built with any amount of process, so it's on a higher level.

Also the process helps to make less mistakes in work, while not being work itself.

January 10, 2020

 

On undoing git mistakes

This reference is what I use to fix my mistakes while using git for a long time:
https://sethrobertson.github.io/GitFixUm/fixup.html

Also this is a great example of dymanic "web app" without javascript! Yep, sir, anchors only. I really love a pragmatic simplicity of this kind.

Labels: , , ,

January 9, 2020

 

Android Emulator in Docker

Here's what I use for android instrumented tests pipeline: project with Android emulator in Docker image with VNC access. This is new variant of less convenient one (it was forked from Agoda). It wasn't nice to use, but gave me good example. This one is better. Usage:
$ make build-base && make build && make start
. This provides emulator device waiting to run your tests.

PS I am not a big fan of building in docker, however it's possible using avd-base image from same project. I will cover this later.

Labels: , ,

 

Articles on building large systems

Some reading for this week on architecture of a large systems

The good overview of using kubernetes for large finance projects by a brilliant architect Oleg Chunikhin (now CTO at Kublr) and Terry Shea, with whom I was lucky to work during early days of my career:
Making Kubernetes a Reality for Financial Services

Here's a nice description of the key moments on way working on scalable cloud system:
How to sleep at night having a cloud service: common architecture do's

A must-read about choosing a technologies:
Choose boring technology.

Labels: , , , , ,

January 8, 2020

 

Android: one ViewModel per view

It's a surprisingly common belief of using one ViewModel class in several views (screens) in modern Android Jetpack-based MVVM architecture style. In reality ViewModel cannot be shared. There're lots of arguments against reusing ViewModel. Most obvious one is that it mixes data processing logics of different screens which increases complexity of implementing and testing of ViewModels.

Do not create huge ViewModels, keep it simple. Yes, it's more classes per view, however your support and development costs are closer to linear in time.

Labels: , , , , ,

January 7, 2020

 

Blog migration to hugo

As I wrote some time ago, I decided to self-host blog. I'm in process still, however here's some experience.

Sharing here some experience in process (will update this post until done).

TL;DR:
  1. Install latest hugo with snap
  2. Find and install theme (with git submodule - see below)
  3. Try blog with "hugo server ..."
  4. Setup publishing pipeline on blog changes (for example, Jenkins or whatever is preferred).
Detailed steps:
  1. Install blogger_to_hugo migration tool
  2. (This one is not specific to anyone I suppose. I don't want to experiment with lots of new packages in my main macos system, so installing debian 9 as vbox VM. All further is done there).
  3. Run migration from blogger backup with blogger_to_hugo. I got an error:
    TypeError: object of type 'NoneType' has no len()

    Seems like it expects only the english post titles (or maybe texts in english too) and crashes otherwise. Too bad.
  4. Use blog2md which produces a bunch of .md files (not sure about non-english titles, but no crash at least).
  5. Install and try to use zzo theme. It turns out that hugo 0.58 is not compatible. Although it's latest in debian sid (unstable) repo!
  6. Use snap installer (another repo to think of..): snap install hugo
  7. Hmm, zzo theme does still not work showing bunch of "render of 'page' failed..." errors and crashing in the end. Could be a non-english titles.
  8. Trying a hugo theme pure.
  9. Copy and edit config from example site of a chosen theme.
Good points: Bad points: Notes:

Labels: , , , , , ,

December 10, 2019

 

An interview assignment: ML image classifier (WhatsThat app)

Project repository. For how to install app see below "How to install app" section.

WhatsThat app privacy policy:

No user data is collected by app.
P.S. Actually it's completely offline app: contains no networking code at all.

Project summary


Diagram. Data streams overview.

Summary of what's done is below, also see (more in repository readme):

For my own projects I sometimes use non-standard coding conventions for XML (indents = 2 + special attributes order), and some for Java/Kotlin (indent = 2). However for team workflow I believe it's better to use a standards if there's no team decision otherwise. Also for larger teams >5 people it's better to always stick to standards (helps onboarding).

How to install app


Update 10 Dec:
- Implemented unit and instrumented tests
- Added unit test to CI pipeline
- Started adding dockerized android for instrumented tests (problem: server does not provide /dev/kvm, so emulator needs to be tunes to use ARM system image)
- Added user to Jira, Jenkins, Artifactory. Will share credentials tomorrow in a task report.
- Todo: Add Jenkins-slave with kvm to run instrumented tests.
- Todo: Add some general diagrams to show work flow, compose full task report.

Update 9 Dec: 
- Added MVVM with Jetpack to easily bind image classification with UI output
- Added dagger2 to more simple load of components
- TensorFlow model now works fine
- Project repo: https://gitlab.gotalkmobile.com/shamilg1/image-classifier
- Todo: Setup a functional test to be run in Jenkins as pre-build step. I plan to add a dockerized android emulator espresso test
- Todo: Add some general diagrams to show work flow.

Update 7 Dec: 
- Added Jira/Gitlab/Jenkins/Artifactory integrations and set up CI pipeline with CD to Artifactory.
- Added planned tasks to Jira (Kanban-based).
- Basic kotlin CameraX implementation is done.
- Tomorrow todos: set up basic quantized image analysis integration and further experiment with models.

5 Dec 2019. I've got assignment for the interview with a nice startup on ML image classification using existing pre-trained model. The aim of this project is to share my skills and experience in dealing with project, specifically an Android app.

I know almost nothing on the practical side of ML, so I've started reading.
Starting point is link from the assignment: firebase.google.com/docs/ml-kit/. The aim is to create Android app to classify an image like in the HBO's Silicon Valley's "Hotdog or not" app. Nice one, and a good chance for me to try ML.

From what I see like there're several frameworks available for Android from Google (I was surprised on wide range of them!):
  • TensorFlow (for IoT and mobile devices, has pre-trained models)
  • ML Kit
  • CloudVision (google cloud backed only, has first-1000-images-free period)
  • AutoML (this is on training a custom model)

There're some good ML learning materials not tied to specific framework:

TensorFlow
TensorFlow has some pre-trained models listed at: https://www.tensorflow.org/lite/guide/hosted_models. Seems like there's a balance between accuracy and latency (not sure what NNAPI time is).

There's an Android example image classifier example project: https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android. I believe this is a good start to not to waste time on boilerplate code. Still I will need to build CI pipelines and I'd prefer at least some end to end tests, at least one or two.

I've decided to create a public repo project at my own gitlab's instance as I've all the required CI integrations set up already.

As a first step I'm going to try the TF Android example app with some pre-trained tensorflow-lite model.
From what I can compare now TensorFlow lite fits the task, although if it's not I'll switch to next (CloudVision seems to be a good next step to try). In the next posts I'll share some technical decisions made on this project (like CI, repo, tests, etc.).

Labels: , , , , , , , , , , ,

December 8, 2019

 

Product-minded engineers


I've got a chat today with owner of a small company, which I was working for some years ago, on hiring a junior developer. We discussed a bit on workflow processes, a hiring process and the team culture. After chat I am filled with that context on background and so when I've seen these articles today, they've caught my attention:
The idea of product-minded engineer brings a brick in the wall of knowledge on how to distinguish between the different kinds of engineers. I can consider myself this kind of engineer, and I worked with some of this kind. So I know the difference. Obvious the hiring decision for a small company cannot be based on asking candidates to solve a dynamic programming problems on a e-whiteboard. Something more accurate must be used for a small teams. The important thing is to see how engineer can be involved into product creation not only as coder, but as product-minded engineer.

Labels: , , ,

December 7, 2019

 

Upgrade of Android Studio forgets most code style settings

It seems like Android Studio easily forgets at least some non-standard code style settings when upgrade happens. This is essential for using heavy IDE (versus lightweight like VSCode) to keep environment like code style format settings which are some hard to create and move between projects manually.

Labels: ,

September 10, 2019

 

Plantuml + Gitlab is risky

For a plantuml nice and simple diagrams text generation tool integration with the gitlab server setup, the plantuml server needs to be exposed to external network. Which is not good. Although some of security risks can be mitigated with running plantuml in docker but definitely not all (such as data exposure, DoS attacks) and mitigating them requires lots of careful manual tuning. Gitlab needs plantuml integration to host rendered images on its side. Maybe aa a plugin. I definitely want to investigate this.

Labels: , , , , , , , ,

September 8, 2019

 

On Facebook user data leaks

Some thoughts after recent Facebook user data leak.

I know no evidence of the following, so not stating it's true at all. Though in a light of user data usage restrictions and depersonalisation the real user data would definitely help those who buy ads on Facebook. To put it straight: leaks lead to rise of ad sales!

What I believe is true is that until companies like Facebook is punished really hard for user data leaks, the data leaks incidents will continue to happen.

Labels: , , , ,

August 2, 2019

 

Debian Buster (10) no Java 8 support

I installed Debian 10 onto X220 laptop and discovered that it's no official support for Java 8 according to debian mailing list. Also an installation of recommended PPA containing Java 8 which requires adding gpg keys via apt-key fails. Little disappointed by the keys shit. I'm looking for some other options, as Java 8 is critical for me and I really don't wanna mess up with unofficial openjdk builds.

This resembles me a lot this almost comedian video on how hard to describe the life of sysadmin to non-it people. Palm, palm, palm.
Video link

So no Debian 10 for my X220. Thinking about arch (used it for some years, with some luck of failing video drivers - I don't have a good feeling about it being on laptop) or centos (happy with it on server, not sure about client). Also maybe a Debian 9 is a logical choice as seems like it has Java 8 supported by default.

Labels: , , , , , , , , ,

June 11, 2019

 

An "Ungoogled" Chromium: how to move from Chrome

In light of google disabling adblocking-related API parts for Chrome extensions and lots of other shit about Chrome I started to look for an alternative.
What I came into is "ungoogled chromium" which can be downloaded as many other chromium variants from here. Not sure on next step, can possibly compile it myself with importing latest patches or reverting patch related to API cut (I'm sure they'll make it impossible. though).
There're some challenges in process of moving to Chromium from Chrome, though. Copying profile is not enough ;)

Download link for chrome extension is below, replace version (in format: 74.0) and extension ID with actual values:
https://clients2.google.com/service/update2/crx?response=redirect&prodversion=[PRODVERSION]&acceptformat=crx2,crx3&x=id%3D[EXTENSIONID]%26uc
PS Speaking of privacy and adblock-related extensions, I'm using uBlock origin (gorhill's one) and Tampermonkey with some Medium-related scripts. Cannot imagine browsing without them - internet is just hell (from my point of view I can compare it with popups and blinking banners of 90s).

Labels: , , , , , , ,

May 7, 2019

 

Flickr: an end of era and Thoughts on software subscription model

Flickr

I've just noticed that Smugmug's acquisition of flickr lead to price raise 2x times: since 2018 a year of Pro cost $50 (and they are allowing 1000 only - I have more - while deleting all other photos). So I'm downloading my photos and closing my account at flickr. Frankly speaking that's not a price only, but that definitely was a turning point for me.

Not sure yet where to host instead (and do I need a photo hosting at all). I seem to not like or need any of them, including instagram, fb, vk.

Thoughts on software subscription model

PS The software prices of 80s are high. But seems like software prices have been rising for some time now with the widespreading of the subscription model. Take for example lightroom. The 6th version infinite license (not subscription one) cost around $150. Subscription cost $120 yearly. Same for MS Office. Sure, it comes with oneDrive, and oneDrive's file on-demand download works like magic (compare it with dropbox process of selecting the folders to sync manually and hope nothing is lost). But if one does not want or need it, no way.

This year I stopped using Lightroom subscription after paying $180 - I just realized that paying more than infinite license cost before is wrong and I have a kinda mental right (although for sure not any kind of legal one, and for the record I do not do this!) to pirate it ;-).

And don't give me that bullshit on software updates that cost a lot. As a local software user I want stability and predictability more than any updates (OS is completely different substance as it's dealing with networking and security). Oh, I know that software engineers wants salaries to feed their families. But please just let your users decide if they want a new version or stay with this one. Limiting options to "pay for new version or stop using it" is just a wrong dichotomy. Company can hire contractors on monthly basis ;-)

Labels: ,

April 27, 2019

 

Is Medium a noise-based platform?

Today I've searched some info on gson and found this blog post which as I use uBlock to block popups (like medium popups which I hate), I've noticed this text instead of image (almost all Medium-hosted blogs uses some strange full-screen images which usually consume first full-height page scroll, or more):
"This image has nothing to do with the article, but Medium recommended to add a picture ¯\_(ツ)_/¯".

Hey. Stop. If this has nothing to do with your article, why the hell did you add it? I don't care about my bandwidth, but it still consumes screen space (even blocked - it's blank space) and it's noise as author just sincerely wrote.

This shall not be the modern web. Yet Medium is a profitable company! I now still use Blogger which shares founder with Medium. But Blogger was and is not that bad! Just to give some clue of how much noise is on the first page of a regular Medium-based blog here's a screenshot (hint: everything is a noise!):
UPD: typos, formatting.

Labels: , , , , , ,

April 23, 2019

 

Upgrading Android project to Studio 3.4

Upgrade involves:
  1. dependency versions chain upgrade: studio -> gradle plugin -> kotlin version
  2. solving mysterious problems with desugaring D8 (add "android.enableD8.desugaring=false" to gradle.properties)

I'm not very happy when I'm unexpectedly forced to spend 3h+ on infinite chain of tasks. This repeats itself for most of the Android Studio upgrades.

Labels: , , ,

April 14, 2019

 

Blueprint reverse-engineer server configuration

This post is more a bookmark for myself. Recently I've stumbled upon the server config reverse-engineering solution: Blueprint. I was reading about Slicehost, the hosting company that was bought by Rackspace in 2008.

Labels: , , , , ,

April 2, 2019

 

Brilliant talks on technology and leadership

I highly recommend these two healthy and spicy talks by Brian Cantrill (Joyent CTO, former Oracle, Sun; DTrace creator):
on tech leadership without management
on great principles of tech leadership

Labels: , , , , , , ,

March 15, 2019

 

Android "DataBindingComponent not found" error solution

In case while building there's flood of "symbol not found: DataBindingComponent" errors (which are fake), try to increase max number of errors with adding javacOptions after dataBinding into app gradle file:
    dataBinding {
        enabled = true
    }
    kapt {
        javacOptions {
            // Increase the max count of errors from annotation processors.
            // Default is 100.
            option("-Xmaxerrs", 500)
        }
    }

Labels: , , , , , , ,

February 21, 2019

 

Email validation regex

A full email RFC 822 validator regular expression. It almost does not fit into one screen height.

Labels: , , , ,

December 9, 2018

 

Why FAR manager is better than Midnight Commander?

Far manager is so much better than mc because mc has inconveniences like this https://midnight-commander.org/ticket/3664: unable to type `-` key (among other keys) in command line (at least when used on macbook). This makes any serious usage of mc almost impossible (because cannot type any command line argument as it always starts with `-`).

Labels: , , , ,

November 23, 2018

 

Jira manual update process is ugly and does not have any alternative

I've recently bought a Jira license in order to have my own bugtracker for projects I do. For my projects I personally like to use classical bugtracking, which cannot be fully replaced by something like Trello.
When the time came to update Jira version, the quick check shown that there's no way to update Jira in any automatic way. Administrator must each time go to web site, choose OS version, start download, abort it, copy link from Downloads and wget- or curl- it on server. Then manually unpack it and play with symlinks (or some other way to gracefully abort upgrade if one prefers).
Seems like in this case Atlassian has some business requirements that override product usability. This is first sign that the product design is drawn by primarily interests of non-tech people in Atlassian. As long as Jira product is sold to support the technical process and make it cheaper, this decision to make update process unstable (as it needs special attention), this ruins my trust in product and company in general. To understand the scale of this decision just imagine that for example 10 different products on your servers need manual update process. This is at least annoying and bug-prone because involves human factor. So from my point of view this is a clear sign that (1) either company generates enough money to let marketing people make shitty decisions and override technical ones and not to think about competitors or (2) company's left hand does not know (and care) about right one. Any of which is very bad from the client point of view. Any good alternatives for a bugtracker?

Labels: , , , , , , , ,

October 20, 2018

 

Example of bad security model and "We have noticed an unusual activity in your account."

It's always makes sense to spend money on security and especially on threat modelling. This can prevent lots of situations like the loss of users' personal data and account cracking.

Of course sometimes companies use any little reason to get more pieces of personal information, like the mobile phone number. For example, it makes absolutely no sense to ask for a phone number after "unusual account activity" has been already detected. Asking the one user who is logging in to provide his phone number (and possibly linking it to the account as 2FA or account recovery channel) actually is very bad idea in this situation! Because if attacker already has password on hand he can also link his phone number thus effectively preventing the account owner from logging into account forever.

Threat modelling can help understand such situations and prevent them.

Labels: , ,

October 18, 2018

 

Research on why iTunes is launched sometimes when I wake up macbook

The reason is my bluetooth headset :) It sometimes mistakenly connects to laptop (which does not turn off BT for some reason) instead of phone, and OS launches iTunes to feed headset with some music. Solution probably is to turn off "wake up computer" option in settings -> BT -> advanced.

Labels: , , , , , ,

August 28, 2018

 

On SSH security

In case of need to temporary log in into SSH box from non-secure location (i.e. assuming keyboard wiretapping on Intel ME-enabled system) it's possible to use google auth as second-factor auth. It's also worth considering the worst scenario of man-in-the-middle and enable 2FA for a separate non-sudoer account.

Labels: , ,

 

Android emulator window @xfce does not gain keyboard focus

In order to fix it open Settings -> Window Manager Tweaks -> Focus tab -> select the Do nothing (When a window raises itself)

Labels: , , , ,

July 24, 2018

 

Frightening small price for a 48Mpix

Sony released new 48Mpix image sensor which costs ~$29. Just a reminder for myself on how marketing works (as the price of device differs in magnitudes depending on a number of sensor pixels). Of course that's the bus and the remaining image processing which differs, but still.

Labels: , , ,

June 17, 2018

 

Always test for Very Large Input

When developing automated or integration tests it makes sense to test something like Very Large Input (or Output if you're dealing with archive unpacking, for example).

Labels: , , ,

June 13, 2018

 

Docker build unicode filenames issue

When including any non-ASCII filenames into image one need to double-check filenames at char level! The reason is that docker can be creative on how to encode char (for example Й, 1081 (single char) vs И, 1080 + 774 (upper part) (two chars!) - docker makes 2 chars from single one). Thanks docker, you gave me 2 days of uking with this trash!

Labels: , , , ,

May 10, 2018

 

Publish your content on your own site

I'm using blogger.com for a long time. It's more than 10 years already. Since beginning it was very useful to have it publish static html and image files into my web site via ftp. Over time closing of web came to blogger and this feature was dismissed. But over time I'm starting to think it's very nice from a different viewpoints to have my content including blog to be hosted and kept on my own web space. This page contains useful links on how to organize and publish content together with come methods of syndication with aggregators if you need it: https://indieweb.org/POSSE

Labels: , , , , ,

May 4, 2017

 

How to type in Unicode (for linux)

To insert unicode char with known code press Shift+Ctrl-U-[code], for example for this シ Japanese Katakana letter 'si' press ctrl+shift (hold it), then press u-3-0-b-7. Release ctrl-shift and you will have unicode char.

Labels: , , ,

April 18, 2017

 

Wrong frameworks?

The story is very short. Some modern apps are just a resource vampires. Like for example Slack (which I don't regularly use) or Telegram (which I do). Let's see idle use:
- Telegram consumes 1% CPU time (14 minutes in total for 3 days) and 68Mb RAM
- WinWord with 2 docs opened consumes 0% CPU (0 (zero) minutes 34 seconds in total for 3 days) and 43Mb RAM

What. the. hell.?

P.S. Just compare it to now RIP Google Talk app which consumed 1-3 Mb RAM (and had voice calls!).

Labels: , , , , , , ,

April 14, 2017

 

Patch to stop video autoplay in Chrome

I don't like an annoying videos crying out loud on me from respectful web sites (mostly ads). Also I don't want to setup another one Chrome extension (230000 users using that). I already have too much of them. And yes, uBlock Origin cannot stop them all.
So I've patched Chrome (chromium actually) source code and compiled it for myself from source. Voila, it works! Patch is below just to know how simple the change (that is being discussed for 2 years with no effect, while the problem itself exists for much more than 5 years) is.
And yes, I don't mind pressing manually for video to start every time. Also I don't mind stop wasting my data plan and draining laptop battery. Thanks Google for being unfriendly and not having any user settings for this ;-)
Disclaimer: published under MIT License. That is, simply: "as-is", no guarantees, by downloading this patch you know what are you doing.
Download Chrome disable autoplay patch and have fun!

PS. How for Google is that possible to build such an unrelevant ads platform on a base of such modern data analysis techniques and so many context-related ads? I just don't see any relevant video or text ads for the last few years.

Labels: , , , , , , , ,

April 13, 2017

 

Notes on Brave browser

Just a few notes for myself. Took a minute to look through Brave(.com) browser and stuck upon mention that it uses NaCl in Crypto. Why the hell to use NaCl? I get used to disable NaCl  in Chrome when I could - until chrome:plugins control was removed. I just believe that crypto must be as close to CPU as possible, as native as possible (no JavaScript crypto code) and HW accelerated on CPU level. The lesser layers the safer it is, cause so no secret keys could be left in memory to be read by some other process.
Second thing (which could be not relevant, but looks strange anyways), is that it used npm as package manager in previous days.

Labels: , , , , ,

April 12, 2017

 

Arch with mate: cannot lock screen with mate-screensaver, had to move to xscreensaver

I rarely pay much attention to opensource software bugs, but this regression is kind of severe as it touches security of desktop system.
I use Arch as desktop OS, with mate.  After latest update pacman -Syu I noticed that I can lock screen only once after restart or so. It works like this: when selecting "Lock screen" from menu it just does nothing, and it's nothing also in .xsession-errors. So screen remains unlocked.
When I (maybe mistakenly) try to manually execute mate-screensaver it says like "screensaver is already running for this session".
So I took way of getting rid of mate-screensaver and installing and using xscreensaver instead (pacman -S xscreensaver). It works just fine.

Labels: , , , , , ,

April 5, 2017

 

ag regex syntax

Here's how to find the regexp syntax for 'ag' - the silver searcher:
man pcrepattern

Labels: , , ,

March 18, 2017

 

git ssh correct url

If you are like me using personal server to store GIT repos you may have the error like this during first pull/clone considering you have project initialized in your remote home with command $ git init --bare reponame.git
$ git clone ssh://servername/reponame.git 
Cloning into 'reponame'...
fatal: '/reponame.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
The solution is to use slightly different URL, note part '~/':
$ git clone ssh://vm/~/devvit_test.git

Labels:

February 26, 2017

 

SSH SHA-256 fingerprint is not human readable

I'm not sure when this was changed, but now ssh server key fingerprint is human unreadable. Why is this a serious problem? SSH works like any other public key crypto: to execute key exchange one needs to verify other party's public key. If one doesn't do that, no crypto as man-in-the-middle attack could be executed to catch password. The common use-case makes this attack even more probable: even though people frequently uses key auth, the first login after remote VM setup usually takes place using password. So it's very important to verify server's identity which is done usually using server key fingerprint human comparison like here:
$ ssh ...
The authenticity of host '... (...)' can't be established.
RSA key fingerprint is SHA256:qSj/We80nmhTc8Pc4XPazxlpGrnv95EZNXSZB1YsGl0.
Looks like hash trash because it's not easy readable and for sure not so easily memorable as hex format.
Compare that with SHA-1 fingerprint (actually connecting to the same SSH server):
The authenticity of host '...' can't be established.
RSA key fingerprint is 77:5f:3b:1f:84:eb:d2:0c:ca:bd:b3:5d:f7:3c:c3:6f

Grouped hex digits, no trash.
Maybe I'm wrong, but it looks for me that ssh maintainers in this case are blindly following a modern fashion to use sha256 instead of considering which UX leads to less human errors.
I'm not sure if that's somehow connected to using ECDSA keys or not. Anyway this change to sha256 increases human mistakes in using crypto tools like SSH which is very bad.

Labels: , , , , ,

January 23, 2017

 

Hibernate downloads

Hibernate.org's 'hibernate tools' redirects to jboss downloads, where "Stand-alone Installer" link is '404 not found'. Cool. Here it is: http://tools.jboss.org/downloads/devstudio/neon/10.2.0.GA.html#direct_download
 

Neocities registration leads to third-party microsoft account creation for same email

Several hours after registering at Neocities I've received confirmation email from Microsoft:
To finish setting up this Microsoft account, 
we just need to make sure this email address is yours.

The thing is that I'm pretty sure I did not create any microsoft emails by myself and this email is a secondary one and I do not use it frequently.

So be careful when using Neocities as they could have some data leak.

Labels: , ,

January 10, 2017

 

Notes on Apache Spark

Based on Datastax intro.

1. Distributed computation engine (aim on low latency)
2. Could be used both batch-mode or interactive
3. In-memory
4. Faster than Hadoop
5. Fault-tolerance out-of-the box

Labels: , , ,

 

Notes on Apache Cassandra

These notes are based on short intro.

1. cassandra has thing called "partitioning key" which is a part of the _primary key_
PK -> consistency hashing function -> value determines which Bucket (range of Hashes) it fits into -> which node we need to talk to

2. CAP theorem tradeoffs. Cassandra is Highly Available (Availability) and Partition Tolerant (Partitioning)

3. Replication. RF = 3 - factor of replication.

4. Consistency level (how many confirmations of actual nodes has written data): { All, Quorum, One }. Also can have a modifier "Local" in case of multiple data centers. We can write to different DC which could be one for OLAP one for OLTP (for different queries does not impact performance each other)

5. CL - per query; RF - per keyspace

Labels: , , ,

January 9, 2017

 

Business Logics vs Data Logics

Here's a great post on what is business logics and should we use Stored Procedures for this kind of stuff.

Labels: , , , ,

November 3, 2016

 

I'm sharing a TED talk

Great talk on "why work does not happen at work" about offices, meetings and sleep time.

Labels: ,

August 6, 2016

 

Compiling i686 kernel v2.6.34.1 on x86_64 centos v3.10.0

Want to compile small kernel.

As a first step, as I cannot yet compose the working initrd, I will use the existing pmagic iso which is 2.6.34 for i686 and replace kernel image.

As for package dependencies/toolchain - too many, search for error or ask me in comments.

$ git clone -v git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ git branch v2.6.34.1
Then patch something:
$ cd linux-stable ; patch -p0 < patch.diff

Patch is below:

Read more »

Labels: , ,

This page is powered by Blogger. Isn't yours?