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
| # Put ci.yml file in .github/workflows | |
| name: CI | |
| on: push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| container: python:3.8.2-buster |
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
| # Put .gitlab-ci.yml file in root dir | |
| image: python:3.8.2-buster | |
| services: | |
| - postgres:12 | |
| - redis:5.0 | |
| variables: | |
| POSTGRES_DB: ci_demo |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "path/filepath" | |
| "strconv" | |
| ) |
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/bin/env python3 | |
| import argparse | |
| import random | |
| import secrets | |
| import string | |
| def get_args(): | |
| p = argparse.ArgumentParser( | |
| description="Random and secure string generator.") |
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
| copy = (e) -> | |
| if e.target.id isnt 'copy' | |
| return | |
| data = document.getElementById 'link' | |
| data.select() | |
| try | |
| # TODO: remove message | |
| successful = document.execCommand 'copy' | |
| msg = if successful then 'successful' else 'unsuccessful' |