setup.py
yakuza:src kw$ cat testapp/setup.py
#!/usr/bin/env python
from distutils.core import setup
print("hello from a python script") |
# Reliable persistent SSH-Tunnel via systemd (not autossh) | |
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service | |
[Unit] | |
Description=Tunnel for %i | |
After=network.target | |
[Service] | |
User=tunnel | |
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i |
var viewer = new Cesium.Viewer('cesiumContainer', { | |
infoBox : false, | |
selectionIndicator : false | |
}); | |
var entity = viewer.entities.add({ | |
position : Cesium.Cartesian3.fromDegrees(-123, 44, 10), | |
model : { | |
uri : '../../../Specs/Data/Models/Box/CesiumBoxTest.gltf', | |
minimumPixelSize : 128 |
--- | |
- name: Add Percona apt signing key | |
sudo: yes | |
apt_key: keyserver=keys.gnupg.net id=1C4CBDCDCD2EFD2A state=present | |
- name: Add Percona repository | |
sudo: yes | |
apt_repository: repo='deb http://repo.percona.com/apt trusty main' state=present | |
- name: Add Percona source repository |
{% macro render_field(field) -%} | |
{% set with_label = kwargs.pop('with_label', False) %} | |
{% set placeholder = '' %} | |
{% if not with_label %} | |
{% set placeholder = field.label.text %} | |
{% endif %} | |
<div class="form-group {% if field.errors %}error{% endif %}"> | |
{% if with_label %} | |
<label for="{{ field.id }}" class="control-label"> | |
{{ field.label.text }}{% if field.flags.required %} *{% endif %}: |
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
# Installation | |
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
# Easy Peasy | |
ffmpeg -i video.mp4 video.webm |
import flask | |
class LaxFlask(flask.Flask): | |
def add_url_rule(self, *args, **kwargs): | |
if 'strict_slashes' not in kwargs: | |
kwargs['strict_slashes'] = False | |
super(LaxFlask, self).add_url_rule(*args, **kwargs) | |
# instantiate with LaxFlask instead of Flask | |
app = LaxFlask(..) |
just change out app_name for your purposes
openssl genrsa 2048 > app_name-wildcard.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key app_name-wildcard.key > app_name-wildcard.cert
# Common Name (eg, your name or your server's hostname) []:*.app_name.com
openssl x509 -noout -fingerprint -text < app_name-wildcard.cert > app_name-wildcard.info