MySQL is a very popular relational database (it’s freeee), so I was a bit surprised when realized that you just can’t easily grant some permissions ONLY for certain procedure without any problems and also there is not much information about such problem over noble resources. Sure you can do it with a bit of a `hack` and let’s try that.

Image for post
Image for post
Who is that newuser? What can he do?

First things first:

The Problem:


Well here are 2 invaluable programs for Windows: Total Commander and Everything.

Image for post
Image for post

Total Commander is file manager (like Windows Explorer, but way better in any case), that can be extended using plugins like: sFTP, various format file readers and etc.

Everything is super fast file search engine for Windows with light indexing and fuzzy search.

So it seems like a good idea to mix Everything and Total Commander to search and manipulate files/directories.

To make all run smoothly — use Everything with the same user as Total Commander.

Open Tools->Options in Everything and choose Context Menu there. In the “items” list choose the option (title) that suits you and just change it’s command to the one below. …


Best password managers 2019 they say, and they say similar things too, but they are not even mentioning the best program I’ve discovered years ago that’s still evolving.

Image for post
Image for post
Ah, PAS$WORD!

There are so many password managers out there: LastPass / Dashlane / 1Password… Just because it became critical to have various difficult passwords linked to variety of resources. The mentioned programs are just making your life more secure => your hair becomes way softer and shinier!

But.. The main problem with all that popular password managers is that they are: closed source and almost all of them are web related, you have to believe that they store everything securely, have normal security policies in the organizations and are bulletproof to wild hackers. Some of them have even password rotation features (so that their service authorizes to specific websites, changes there the passwords and saves the changed ones in your storage, without even noticing you), scary and pleasant at the same time! …


The first story will be just a regular day 20.11.2018, ending with evening walk in Tbilisi’s historical center, accompanied by Nata.

The office day at eMoney started as usual. I was at work by 9, driven here by some really crazy prius — taxist!

Image for post
Image for post
Office “view”


Just a quick and very specific tip. Writing here, because “google did not help”, so maybe it will be useful for someone.

The problem: Our EC2 machine lost connectivity to external resources (there was no outgoing traffic) after reboot. It had associated ElasticIP, but public DNS for the instance could not have been resolved.

Image for post
Image for post
Just cant get even packages from AWS own repos

Image for post
Image for post

It was a bit of a surprise for me to guess that there is not much material on using https://github.com/kennethreitz/records with MySQL database… So just a smaaaaaall instruction right here:
Records is a wrapper module over https://www.sqlalchemy.org ORM for Python. So from here all the almost settings it can have are from SQLAlchemy, just with addition of some bells-and-whistles.
The basic example on Records’ GitHub is:

import records
db = records.Database(‘postgres://…’)
rows = db.query(‘select * from active_users’) # or db.query_file(‘sqls/active-users.sql’)

Without any explanation :) SO this small post is just to give you the start with this nice little(not that little actually, because it adds bunch of export abilities too (whistles from Pandas )) module. …


Image for post
Image for post
taking bot?

As a developer I always need as complete logs as I can get for the current version of my software. But the logs are another topic, probably I will talk about once in a future, for now I want to concentrate on some specific kinds of logs: critical points notifications. Before all the major messengers got the ability to create and use bots — the most obvious decision to notify yourself or your team was to send an email. The drawbacks were a messy interface, slow search, not available until you open your mail client. Telegram is one of the most advanced messengers nowadays with nice and simple bot API with which you can do a lot of things like automating tasks or manage simple ones. The bot is: NOTHING, just a registered bot and that’s all, without even single line of code in it. Why? …


Image for post
Image for post

The technique, mentioned in the title is just on of the many and there are plenty of ways achieving our target result…

For current article — let’s take some predefined setup, so that I can show you my own steps with screenshots, but the approach would be almost the same for other ways (I’ll mention them too, just without explanation).

— — — — — —

Setup

  • Some server with already prepared branch for deployment (for example origin/master or production), the described below method is suitable for projects that are not compiled (PHP/Python..), but with some more Kung Fu can be adopted to compiled projects too: deploy bin folder with dependencies for .NET, …


Today had to find some aspects from the code, but didn’t really remember the right repository, where the sample was.. We use BitBucket for code storage and suddenly I’ve found that they have a nice feature in their cloud interface: you can fast search for any text across all your repositories.

Image for post
Image for post

But the main feature here is that the search is not just simple INDEX, they added priorities to some terms so that you get more relevant results for the language you have used in that project.

Example:

For the term “hash” it shows:


Image for post
Image for post
Real escape string

Lately some clients of our software began to contact the support with specific problems: their input was looking right (they even send screenshots with proofs), but when the system was trying to parse the string and validate it using regular expression of, for example, numbers — client was receiving error with statement that the parameter was entered not correctly. Its not hard to guess that if the character is not visible — it means that there can be some hidden (not presented in rendering font) character, like, for example, “line ending” or “tabulation” (for example: ‎01026019 in ASCII after paste from editor that supports Unicode, but 01026019 in Unicode). In case of our client it was: RTL mark (In Unicode, the RLM character is encoded at U+200F RIGHT-TO-LEFT MARK (HTML ‏ · ‏). …

About

Dima Pursanov

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store