ssh-keygen -t ed25519 -C "user@email.com" -f ~/.ssh/id_rsa_github
ssh-keygen -t ed25519 -C "user@email.com" -f ~/.ssh/id_rsa_gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A sample to send message on Google Chat group with Python requests. | |
Prerequisites: | |
- Google API v1 | |
- A webhook URL taken | |
- Python 3 | |
- Requests (last tested with 2.31.0) | |
Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set PROJECT = env['project'] %} | |
{% set REGION = properties['region'] | default('us-east1') %} | |
{% set PARENT = 'projects/' + PROJECT + '/locations/' + REGION %} | |
{% set PREFIX = env['deployment'] %} | |
{% set CLOUDRUN_TYPE_PROVIDER = PREFIX + '-provider' %} | |
{% set CLOUDRUN_SERVICE_TYPE = PROJECT + '/' + CLOUDRUN_TYPE_PROVIDER + ':projects.locations.services' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from contextlib import contextmanager | |
class TestCase(unittes.TestCase): | |
@contextmanager | |
def assertNotRaises(self, exc_type): | |
try: | |
yield None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's your list of choices that would be displayed in a drop-down | |
# element on the web. It needs to be a tuple, and we define this | |
# as a variable just for readability/convenience. | |
# | |
# This example has 3 choices, each of which consists of two parts: | |
# 1. the thing that get strored in your database | |
# 2. the thing that you see in a dropdown list | |
LABEL_CHOICES = ( | |
('this gets stored in your database', 'This item is what you see in the drop-down'), | |
('django', 'Django'), |