# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
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/env python | |
""" | |
Real time log files watcher supporting log rotation. | |
Author: Giampaolo Rodola' <g.rodola [AT] gmail [DOT] com> | |
License: MIT | |
""" | |
import os |
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
server { listen 80; | |
server_name example.com; | |
access_log /var/log/example.com/nginx.access.log; | |
error_log /var/log/example.com/nginx.error.log; | |
root /var/www/apps/example.com/public; | |
charset utf-8; | |
location / { | |
rewrite ^ https://$host$request_uri? permanent; | |
} |
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
#cloud-config | |
output: | |
all: "|tee -a /tmp/cloud.out" | |
bootcmd: | |
- curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - | |
apt_sources: | |
- source: "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | |
packages: | |
- elasticsearch | |
runcmd: |
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 | |
# | |
# This script will create xenial and trusty lxd images that will be used by the | |
# lxd provider in juju 2.1+ It is for use with the lxd provider for local | |
# development and preinstalls a common set of production packages. | |
# | |
# This is important, as between them, basenode and layer-basic install ~111 | |
# packages, before we even get to any packages installed by your charm. | |
# | |
# It also installs some helpful development tools, and pre-downloads some |
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
*.img | |
*.raw |
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
*.img | |
*.raw |
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 collections import OrderedDict | |
# ... | |
class OrderFormMixin(object): | |
''' | |
To apply add to Meta 'order' iterable | |
''' | |
def __init__(self, *args, **kwargs): | |
super(OrderFormMixin, self).__init__(*args, **kwargs) |
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
import unittest | |
# Code | |
def get_permutations(input_str): | |
input_len = len(input_str) | |
results = [] | |
if input_len == 0: |
DB
ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name
ovs-vsctl set port vlan1729 tag=1729
OlderNewer