Skip to content

Instantly share code, notes, and snippets.

View Melchizedek13's full-sized avatar

Nikolay Sokolov Melchizedek13

View GitHub Profile

Custom pytest plugins

Apache Airflow pytest plugin

This plugin help set up Apache Airflow unit test environment

Plugin capability

@brokensandals
brokensandals / solution.py
Created July 28, 2019 23:32
A python solution to HackerRank's "Common Child" problem
#!/bin/python3
import os
# Complete the commonChild function below.
def commonChild(s1, s2):
maxAt = {}
for i1 in range(len(s1)):
maxForI1 = 0
@thoaster
thoaster / reset.sh
Last active April 17, 2024 21:19
Transmit 5 Trial Reset
#!/bin/sh
# Reset Transmit 5 Trial
# curl -fsSL https://gist.githubusercontent.com/thoaster/ca5b4fdb653b9cdb3930897045b78558/raw/reset.sh | bash
set +e
set -x
sudo rm -rf ~/Library/Caches/com.panic.Transmit
sudo rm -rf ~/Library/Application\ Support/com.panic.Transmit
sudo rm ~/Library/Preferences/com.panic.Transmit.plist
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@jchandra74
jchandra74 / PowerShell Customization.md
Last active March 1, 2024 01:02
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@patrickmmartin
patrickmmartin / PYTHON_DEFAULT.md
Created February 5, 2017 09:48
update-alternatives for python3 on Ubuntu

Ubuntu 16 default python is almost python 3

Loads of solutions exist, but for changing the system default, alias is not the way to go.

$ update-alternatives --list python update-alternatives: error: no alternatives for python

@wojteklu
wojteklu / clean_code.md
Last active May 11, 2024 04:18
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@nobitagit
nobitagit / iterm2.md
Last active August 24, 2023 12:16
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
@CraigRodrigues
CraigRodrigues / resize.c
Last active January 19, 2021 00:08
CS50 pset4 - "Resize"
/**
* resize.c
*
* Computer Science 50
* Problem Set 4
*
* Copies a BMP piece by piece, but also resizes it, just because.
*/
#include <stdio.h>
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 7, 2024 11:49
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7