Skip to content

Instantly share code, notes, and snippets.

@dl6nm
dl6nm / .gcloudignore
Last active May 14, 2020 13:05
Configuration templates for Google App Engine Python 3 standard environment with CI/CD .gitlab-ci.yml
# https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore
#
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
@dl6nm
dl6nm / add_to_clipboard.py
Created February 10, 2020 09:40
Add text from Python to the Windows clipboard
import os
def addToClipBoard(text):
command = 'echo ' + text.strip() + '| clip'
os.system(command)
#example
addToClipBoard('Hello')
@dl6nm
dl6nm / grafana_telegram_bot.md
Created July 1, 2020 09:05 — forked from ilap/grafana_telegram_bot.md
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@dl6nm
dl6nm / config
Created July 23, 2020 06:51
Set user credentials in .git/config
# Add the following lines to your .git/config to set other credentials than the default ones used in [Fork Git Client](http://fork.dev/)
[credential "https://github.com/username/repository.git"]
helper = manager
username = username
useHttpPath = true
@dl6nm
dl6nm / how-to-update-all-python-packages.md
Last active March 13, 2024 11:09
Hot to update all Python packages with pip
@dl6nm
dl6nm / conftest.py
Created October 15, 2020 09:40
pytest helper class with static method (function) in conftest.py
import pytest
class Helpers:
@staticmethod
def help_me():
return "no"
@pytest.fixture
@dl6nm
dl6nm / git-commit-message-conventions.md
Last active May 3, 2022 12:06
Git Commit Message Conventions - Conventional Commits

Git commit message conventions

Format of the commit message

[revert: ]<type>[(<scope>)]: <subject>
    |      |        |           |
    |      |        |           +--- very short description of the change
    |      |        |                (use imerative, parent tense: 'change' not 'changed')
    |      |        |

| | +--------------- optional: specifying place of the commit change

@dl6nm
dl6nm / sign-git-commits.md
Created November 4, 2022 06:51
Sign your Git commits with GPG key

Sign your Git commits

After you add your public key to your account, you can sign individual commits manually, or configure Git to default to signed commits.

Sign individual Git commits manually:

  1. Add -S flag to any commit you want to sign:

    git commit -S -m "My commit message"

  2. Enter the passphrase of your GPG key when asked.