Skip to content

Instantly share code, notes, and snippets.

View bayborodin's full-sized avatar
🏠
Looking for a remote job as a Python developer

Nicholas Bayborodin bayborodin

🏠
Looking for a remote job as a Python developer
  • SKAT
  • Khabarovsk, Russia
View GitHub Profile
@bayborodin
bayborodin / emacs.md
Last active May 27, 2020 12:46
Emacs Cheet Sheet

Emacs Cheet Sheet

Top Commands

C-x b buffer name - swith to the buffer with name name

C-x o - switch between windows

C-x 0 - close current window

C-x 1 - close all windows expect current

@bayborodin
bayborodin / datetime_string.py
Created August 27, 2019 12:17
Generate the current datetime string
import time
timestr = time.strftime("%Y%m%d-%H%M%S")
print(timestr)
@bayborodin
bayborodin / django-rest-docker.md
Last active July 9, 2020 02:32
Django Rest Framework Cheatsheet

Django Rest Framework Cheatsheet

This file comprises of the main features of Django Rest Framework that I use.

Ft. Pipenv, Docker, DRF, Django, Postgres, Production, React, Api's, and Testing

Docker

Install

@bayborodin
bayborodin / reconnect.cmd
Created December 5, 2018 02:31
Monitoring and reconnect VPN
@echo off
:start
echo %date% %time%
echo Start...
echo Pinging...
ping 74.125.39.104 >dev.null && goto pinging || echo ping fault =^> Connect && goto dialing
:redialing
@bayborodin
bayborodin / snippets.sql
Created November 10, 2018 11:24
PostgreSQL Basic Commands
-- superuser login
sudo -u postgres psql
-- exit
\q
-- list databases
\l
-- conenct database
\c dbname
@bayborodin
bayborodin / snipet_1.py
Last active November 2, 2018 11:36
Python code snipets
""" Iterration with counters """
monthes = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']
for idx, month in monthes:
print('#{} {}'.format(idx, month)
@bayborodin
bayborodin / subtitle-extract.md
Created October 4, 2018 09:57 — forked from pavelbinar/extract-subtitles-from-mkv.md
Extract subtitles from *.mkv files on Mac OS X

Extract Subtitles From .mkv

This instructions whall work on any system (Mac OS X, Linux) supporting installation of mkvtoolnix

Install mkvtoolnix

If you don't have Homebrew installed, do it first, the continue with following command:

brew install mkvtoolnix
во всех вакансиях пишут надо знать SOLID
на любую должность практически (edited)
ладно верстальщикам не пишут
в общем складывается ощущение что солид это то без чего код не полетит
и только он спасет нас
sunscreed [3:38 AM]
+
isergius [3:39 AM]
@bayborodin
bayborodin / ddl.sql
Last active March 26, 2018 12:38
Thinknetica - Lesson 3
-- Create a test_guru database
CREATE DATABASE test_guru;
-- Create a categories table with a title attribute
CREATE TABLE categories (
id serial PRIMARY KEY,
title varchar(50) NOT null
);
-- Create a tests table with attributes: tittle, level and with an external key to the categories table
@bayborodin
bayborodin / HTTP Request
Last active March 21, 2018 22:10
HTTP Requests
GET /anything HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Connection: keep-alive
Server: meinheld/0.6.1
Date: Wed, 21 Mar 2018 14:20:31 GMT
Content-Type: application/json
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true