Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
# This is an example of a bring your own (byo) host inventory | |
# Create an OSEv3 group that contains the masters and nodes groups | |
[OSEv3:children] | |
masters | |
nodes | |
#etcd | |
#lb | |
# Set variables common for all OSEv3 hosts |
/* | |
* This script reads the existing partition assignments in JSON (exported using kafka-reassign-partitions.sh) and generates | |
* the appropriate reassignment JSON file for input to kafka-reassign-partitions.sh. | |
* | |
*/ | |
var usage = ` | |
Usage: node increase-replication-factory.js (brokers) (replication factor) (current assignment file) (output file) [-f] | |
* brokers: comma separated list of brokers | |
* replication factor: the new replication factor to use |
#!/bin/bash | |
sudo touch "/Library/Preferences/VMware Fusion/promiscAuthorized" |
Windows Service with Python 3.5 and pyinstaller
{ | |
"Version": "2012-10-17", | |
"Id": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME/SQSDefaultPolicy", | |
"Statement": [ | |
{ | |
"Sid": "example-statement-ID", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
#!/usr/bin/env bash | |
set -x -e | |
JUPYTER_PASSWORD=${1:-"myJupyterPassword"} | |
NOTEBOOK_DIR=${2:-"s3://myS3Bucket/notebooks/"} | |
# home backup | |
if [ ! -d /mnt/home_backup ]; then | |
sudo mkdir /mnt/home_backup | |
sudo cp -a /home/* /mnt/home_backup |
#!/usr/bin/env python3 | |
''' | |
This script sets a retention on all the logGroups that don't have one set | |
''' | |
import boto3 | |
import logging | |
# Retention it will be set to | |
RETENTION = 30 |