Read content from the current buffer and run it in python.
exec '!echo ' . shellescape(join(getline(1, '$'), '\n'), 1) . ' | python --'
apiVersion: argoproj.io/v1alpha1 | |
kind: Workflow | |
metadata: | |
name: generate-parameters-workflow | |
namespace: workflow-prod | |
generateName: generate-parameters- | |
spec: | |
entrypoint: Main | |
serviceAccount: workflow | |
serviceAccountName: workflow |
Read content from the current buffer and run it in python.
exec '!echo ' . shellescape(join(getline(1, '$'), '\n'), 1) . ' | python --'
from botocore.loaders import create_loader | |
from botocore.regions import EndpointResolver | |
endpoints = create_loader().load_data('endpoints') | |
partitions = [part['partition'] for part in endpoints['partitions']] | |
for partition in partitions: | |
s3_regions = EndpointResolver(endpoints).get_available_endpoints("s3", partition) | |
aws_partition = next( |
Some common variables for all functions
const NOTION_API_KEY = process.env.NOTION_API_KEY;
const headers = {
Accept: "application/json",
"Notion-Version": "2021-08-16",
"Content-Type": "application/json",
curl -s https://www.checkiday.com/rss.php \ | |
| grep -o -E "<title><\!\[CDATA\[[^<]+</title>" \ | |
| sed -E "s/.+CDATA\[(.+)\]\].+/\\1/" \ | |
| head -n1 | |
# Curling is Cool Day |
from bs4 import BeautifulSoup, Comment | |
from typing import Dict, List, Optional, Tuple | |
AllowedTagsType = Dict[str, Optional[List[str]]] | |
# Example: | |
default_allow_tags = { | |
"p": None, | |
"b": None, # Allow no property |
<script>
Array.prototype.slice.call(document.querySelectorAll("a[href^=http]")).map((el)=> {
el.setAttribute("target", "_blank");
el.setAttribute("title", el.href);
el.setAttribute("rel", "noopener");
});
You can add the following functions for your shell, loadenv
will search for .env file if found will export all to the shell session with unloadenv
will unset the variables so you can start again, reloadenv
will reread the .env file.
function loadenv {
test -f .env || echo "No .env file in the working directory"
oldenv=$(env|sort)
export $(grep -v '^#' .env | xargs -d '\n')
diff <(echo "$oldenv") <(env | sort)
Most packages still fail due peer dependency version resolve. Packages like expo-cli. To be able to install it make sure you have the legacy mode for resolving versions is enabled
npm config --global set legacy-peer-deps true