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
| <template> | |
| <!-- App --> | |
| <div id="app"> | |
| <!-- Statusbar --> | |
| <f7-statusbar></f7-statusbar> | |
| <!-- Left Panel --> | |
| <f7-panel left reveal layout="dark"> | |
| <f7-view id="left-panel-view" navbar-through :dynamic-navbar="true"> |
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
| // key to use for get/set state: | |
| export const LOCALSTORAGE_KEY = '..' | |
| // as an action: | |
| export const PERSIST_ACTION = ({ rootState }) => { | |
| let stateAsString = JSON.stringify(rootState) | |
| window.localStorage.setItem(LOCALSTORAGE_KEY, stateAsString) | |
| } | |
| // restore a cached vuex store: |
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
| # pip install what3words | |
| # setup: | |
| api_key = environ['W3W_API_KEY'] | |
| w3w = what3words.Geocoder(api_key) | |
| # forward: 3 words to address: | |
| In [18]: w3w.forward(addr='prom.cape.pump') | |
| Out[18]: |
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 python:3.4 | |
| ENV PYTHONUNBUFFERED 1 | |
| RUN mkdir -p /code | |
| WORKDIR /code | |
| ADD requirements.txt /code/ | |
| RUN pip install -r requirements.txt | |
| ADD . /code/ |
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
| STATUS_CODES = { | |
| 100: "100 Continue", | |
| 101: "101 Switching Protocols", | |
| 102: "102 Processing", | |
| 200: "200 OK", | |
| 201: "201 Created", | |
| 202: "202 Accepted", | |
| 203: "203 Non-authoritative Information", | |
| 204: "204 No Content", |
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
| echo "This is a secret" | docker secret create my_secret_data - |
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
| - hosts: server_swarm | |
| tasks: | |
| - command: "docker info --format '{%raw%}{{json .Swarm.ControlAvailable}}'{%endraw%}" | |
| register: result | |
| become: true | |
| - debug: msg='Deploy on this host' | |
| when: result.stdout == 'true' | |
| run_once: true |
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
| version: "3" | |
| services: | |
| konga: | |
| image: pantsel/konga:latest | |
| env_file: 'kong.env' | |
| ports: | |
| - '8999:1337' | |
| mongo: | |
| image: mongo | |
| volumes: |
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
| import requests | |
| def send_sms(to, content): | |
| token = '..' | |
| email = '..' | |
| headers = {'Content-type': 'application/json', 'Accept': 'application/json'} | |
| params = { | |
| token: token, | |
| email: email | |
| } |
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
| [bumpversion] | |
| current_version = 1.0.0 | |
| commit = False | |
| tag = False | |
| [bumpversion:file:api/custom_settings.py] |