Skip to content

Instantly share code, notes, and snippets.

@yesnik
yesnik / heidi_sql.md
Created October 22, 2019 12:24
HeidiSQL Reset Filters, Sorting on Data tab

HeidiSQL Reset Filters, Sorting on Data Tab

If you use HeidiSQL database manager, and can't open Data tab in this program because of sort or filter values, you can clear these saved values by editing Windows Registry:

  • Start regedit.exe
  • Delete the key/folder for the table, e.g.: HKEY_CURRENT_USER\Software\HeidiSQL\Servers\MyServer\databasename|tablename
@yesnik
yesnik / words_count.py
Created November 11, 2019 12:55
Python. Display the most frequent words in the text
# Free e-books: http://www.gutenberg.org/
file_name = 'dickens_charles_great_expectations.txt'
with open(file_name) as file_object:
words_count = {}
for line in file_object.readlines():
line_words = line.split(' ')
for word_raw in line_words:
word = word_raw.strip().lower()
@yesnik
yesnik / dell_fedora_audio.md
Last active April 9, 2025 03:55
Dell Vostro 5590 Ubuntu 20.04, Fedora audio not working

Dell Fedora Audio

sudo yum install pulseaudio
pulseaudio --version
pulseaudio 17.0

Reboot.

@yesnik
yesnik / jquery.payment.js
Created August 1, 2020 05:54
jQuery Plugin on sberbank payment page for planeta.tc services
/**
* Payment page universal handler
*/
(function ($) {
jQuery.ajaxSettings.traditional = true; // https://forum.jquery.com/topic/jquery-post-1-4-1-is-appending-to-vars-when-posting-from-array-within-array
var settings = {
// name for orderId parameter
orderIdParam:"mdOrder",
language:"ru",
@yesnik
yesnik / elasticsearch_docs.md
Last active July 25, 2023 13:19
Elasticsearch with Docker

Elasticsearch Docs

URL for Dev Tools: http://0.0.0.0:5601/app/dev_tools

Add data to Elasticsearch

You can add data to Elasticsearch by sending JSON objects (documents) to Elasticsearch over HTTP. Whether you have structured or unstructured text, numerical data, or geospatial data, Elasticsearch efficiently stores and indexes it in a way that supports fast searches.

@yesnik
yesnik / kubernetes.md
Last active November 1, 2024 18:09
Kubernetes Commands

Kubernetes Commands

Kubectl

It is a kubernetes command line tool. It controls the Kubernetes cluster manager. It allows to run commands against our cluster.

  • kubectl version - show the client and server version info
  • kubectl api-resources - show all Kubernetes resources
  • kubectl run hello-nginx --image=nginx:latest --port=80 - start a nginx pod, let the container expose port 80
  • kubectl get pod hello-nginx -o wide - show one-liner info about the pod