This file contains 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/python | |
from pathlib import Path | |
from datetime import datetime | |
from google.cloud import vision | |
LOG_PATH = Path("/home/me/logs") | |
PATH_TO_IMAGES = Path("/data/Pictures/Takeout") | |
client = vision.ImageAnnotatorClient() |
This file contains 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: localhost | |
gather_facts: False | |
connection: local | |
vars: | |
foo: bar | |
tasks: | |
- name: first time - dest is changed, 'dest' is returned in results | |
# yes I'm using template, not copy, but the template action plugin calls the copy module... | |
template: |
This file contains 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
#!/bin/bash | |
# Version tag needs to be dependent on all the files that will affect | |
# the generated image. Currently, only the dockerfile and Python | |
# requirements. | |
VERSION_TAG="$( sha1sum Dockerfile requirements/*.txt | sha1sum | cut -d' ' -f1 )" | |
echo "Image version: ${VERSION_TAG}" | |
echo "Commit SHA1: ${CIRCLE_SHA1}" |
This file contains 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
# author: | |
# @Bartosz Kosarzycki | |
# | |
sudo apt-get install npm | |
sudo npm install -g react-native-cli | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
cd /home/user/your/project/path | |
react-native init AwesomeProject | |
cd AwesomeProject |
This file contains 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
# Create a unique 2048 Diffie Hellman group | |
# https://weakdh.org | |
/etc/ssl/dhparams.pem: | |
cmd.run: | |
- name: openssl dhparam -out /etc/ssl/dhparams.pem 2048 | |
- unless: test -f /etc/ssl/dhparams.pem |
This file contains 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 django.core.management.base import BaseCommand, CommandError | |
from django.db.models import get_models, get_app, fields | |
from django.db.models.fields import related | |
class Command(BaseCommand): | |
help = """Generate factory-boy factories for the given app""" | |
def handle(self, *args, **options): | |
assert len(args) == 1, 'Must specify app name as first and only argument' |