- hosts: all
gather_facts: no
remote_user: root
roles:
- { role: test_become_r2, sudo_user: testing }
tasks:
- command: whoami
| # Call virtualenvwrapper's "workon" if .venv exists. This is modified from-- | |
| # http://justinlilly.com/python/virtualenv_wrapper_helper.html | |
| # which is linked from-- | |
| # http://virtualenvwrapper.readthedocs.org/en/latest/tips.html#automatically-run-workon-when-entering-a-directory | |
| check_virtualenv() { | |
| if [ -e .venv ]; then | |
| env=`cat .venv` | |
| if [ "$env" != "${VIRTUAL_ENV##*/}" ]; then | |
| echo "Found .venv in directory. Calling: workon ${env}" | |
| workon $env |
| [defaults] | |
| remote_user = vagrant | |
| hostfile = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory | |
| private_key_file = ~/.vagrant.d/insecure_private_key |
| Variables | |
| ========== | |
| predefined variables : | |
| - inventory_hostname (fqdn) (normally the same as ansible.fqdn) | |
| - inventory_hostname_short | |
| To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : | |
| ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net | |
| tungstene.arrfab.net | success >> { | |
| "changed": true, |
| # Configuration file for runtime kernel parameters. | |
| # See sysctl.conf(5) for more information. | |
| # See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
| # an explanation about some of these parameters, and instructions for | |
| # a few other tweaks outside this file. | |
| # Protection from SYN flood attack. | |
| net.ipv4.tcp_syncookies = 1 |
| import argparse | |
| import sqlite3 as lite | |
| import os | |
| def _open_db(db): | |
| try: | |
| con = lite.connect(db) | |
| cur = con.cursor() | |
| return (cur,con) | |
| except lite.Error as e: |
| # this forces dpkg not to call sync() after package extraction and speeds up install | |
| RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup | |
| # we don't need and apt cache in a container | |
| RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache |
| # this forces dpkg not to call sync() after package extraction and speeds up install | |
| RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup | |
| # we don't need and apt cache in a container | |
| RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache | |
| RUN echo 'Acquire::Languages "none;"' > /etc/apt/apt.conf.d/no-lang |
| #!/bin/bash -e | |
| #### | |
| # based on https://gist.github.com/jeffery/1115504 | |
| # Helper script to update the Last modified timestamp of files in a Git SCM | |
| # Projects working Copy | |
| # | |
| # When you clone a Git repository, it sets the timestamp of all the files to the | |
| # time when you cloned the repository. | |
| # | |
| # This becomes a problem when you want the cloned repository, which is part of a |
This assumes you have a Xiaomi Ants Smart Camera that still has the open RTSP enabled. I think newer firmware might remove this capability. If you Google enough you can find instructions on how to downgrade.
FFMPEG is where most of the magic happens. I use OSX and as such am a fan of using Homebrew to install free software. Here is my ffmpeg install command:
brew install ffmpeg --with-faac --with-fdk-aac --with-ffplay --with-fontconfig --with-freetype --with-frei0r --with-libass --with-libbluray --with-libcaca --with-libquvi --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-webp --with-x265