以下のパラメータが設定されているものとします。
This file contains hidden or 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
| FROM debian:buster | |
| RUN apt-get update && \ | |
| apt-get upgrade -y && \ | |
| apt-get install -y --no-install-recommends \ | |
| locales && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN localedef -f UTF-8 -i ja_JP ja_JP.UTF-8 |
This file contains hidden or 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
| #!/usr/local/bin/bash | |
| # Use IPython. | |
| PYTHONBREAKPOINT=IPython.terminal.debugger.set_trace python myscript.py | |
| # Use bpython. | |
| PYTHONBREAKPOINT=bpdb.set_trace python myscrippt.py |
This file contains hidden or 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
| --- | |
| all: | |
| hosts: | |
| localhost: | |
| ansible_host: localhost | |
| ansible_connection: local | |
| ansible_python_interpreter: '{{ ansible_playbook_python }}' |
This file contains hidden or 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
| # Fetch issue title | |
| gh issue view --json title -q '.title' [issue id] | |
| # Add alias | |
| gh alias set it 'issue view --json title -q ".title"' | |
| # Use the alias | |
| gh it [issue id] |
This file contains hidden or 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
| # DIST can be debian:buster-slim | |
| ARG DIST=debian:buster | |
| FROM $DIST | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends unoconv && \ | |
| apt-get clean && \ |
This file contains hidden or 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
| # Normal | |
| seq 1 5 | |
| # 1 | |
| # 2 | |
| # 3 | |
| # 4 | |
| # 5 | |
| seq 5 1 | |
| # 5 |
This file contains hidden or 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
| const axios = require(`axios`) | |
| // Pass incoming webhook URL with environment variable `WEBHOOK_URL`. | |
| const WEBHOOK_URL = process.env.WEBHOOK_URL | |
| const title = `Hi` | |
| const subtitle = `Hello` | |
| const paragraph = `Hasta La Vista, Baby.` | |
| const widget = { textParagraph: { text: paragraph } } | |
| axios.post(WEBHOOK_URL, { |
This file contains hidden or 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: |