uuidgen -r
# /etc/NetworkManager/system-connections $ ls -l vlan20
-rw------- 1 root root 145 Mär 28 18:27 vlan20
ensure_pip() { | |
pip show "$1" > /dev/null || pip install "$1" | |
} |
# place into .github/workflows/aws | |
# This workflow will build and push a new container image to Amazon ECR, | |
# and then will deploy a new task definition to Amazon ECS, on every push | |
# to the master branch. | |
# | |
# To use this workflow, you will need to complete the following set-up steps: | |
# | |
# 1. Create an ECR repository to store your images. | |
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`. | |
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name. |
const NodeCache = require("node-cache"); | |
const obj = { | |
_id: "5c7e533ce75227089bd93bbb", | |
texts: [ | |
{ keywords: ["hi", "there"], language: "FR", title: "Art", description: "" }, | |
{ keywords: [], language: "EN", title: "Art", description: "" }, | |
], | |
extension: "jpg", | |
fileDate: "2019-03-18T17:38:52.553Z", |
# copy index definition | |
INDEX_NAME="my_index" | |
curl -X GET "http://source-server:9200/$INDEX_NAME" | curl -X PUT "http://destination-server:9200/$INDEX_NAME" -d @- | |
# copy mapping for "my_doc_type" | |
DOC_TYPE="my_doc_type" | |
curl -X GET "http://source-server:9200/$INDEX_NAME/_mapping" | jq .$INDEX_NAME.mappings.$DOC_TYPE | curl -X PUT "http://destination-server:9200/$INDEX_NAME/_mapping/$DOC_TYPE" -d @- |
location /api { | |
# enable SNI | |
proxy_ssl_server_name on; | |
# you MUST set the host header seperately for SNI to work | |
proxy_set_header Host my-api.example.com; | |
# proxy requests to upstream server | |
proxy_pass https://my-api.example.com; | |
} |
# create a user service for our ssh-agent | |
mkdir -p .config/systemd/user/ | |
cat > .config/systemd/user/ssh-agent.service <<EOF | |
[Unit] | |
Description=SSH key agent | |
[Service] | |
Type=simple | |
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket | |
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK |
#!/bin/bash | |
set -e | |
SCREENSHOT_PATH="~/Pictures/Screenshots" | |
printf "save screenshots in $SCREENSHOT_PATH\n" | |
mkdir $SCREENSHOT_PATH && cd $SCREENSHOT_PATH && defaults write com.apple.screencapture location $(pwd) | |
printf "install homebrew!\n" | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |